Tag Archive library

Setting the Probotix Comet Configuration to Find Your G-Code Library

Personal notes on how to get the LinuxCNC software that comes with the Probotix Fireball Comet CNC to find your personal library of G-code files.

The Probotix Comet controller software (AXIS) by default looks for extra G-code files in /home/probotix/emc2/nc_files.

If one does not wish to store files there, one can edit the /home/probotix/configs/Comet/Comet.ini to point it to the directory of choice.

Change the  PROGRAM_PREFIX parameter to point to the directory of choice. (As always, please back up files before hacking them.)

This will allow one to, for example, load a standard preamble with the G-code:

[code]

o<preamble> call

[/code]

or otherwise allow one to create a library of useful routines.

 

Tags, , , , ,

Including Libraries in the Arduino IDE

There’s an annoying subtlety in the Arduino IDE when using tabs (multiple files in the sketch), that was kindly explained by PaulS on the Arduino forums.

Any Arduino libraries that are needed by the files outside of the sketch (.ino) file must also be listed in the sketch file itself.

Example

You cannot simply do this:

[cpp light=”true”]example.h:

#include <Servo.h>[/cpp]

When you attempt to compile, you’ll get an error like,

In file included from test_junk_02.cpp:1:
test.h:7: error: 'Servo' does not name a type

You must also include the library in the sketch:

[cpp light=”true”]test.ino:

#include <Servo.h>
#incude "example.h"[/cpp]

Explanation

The explanation that PaulS gave was the following:

The sketch is parsed for include files. The sketch, all included header files, and the corresponding source files, are copied to another directory for compiling. From that directory, library-based include files are NOT available unless they are included in the sketch and copied to the build directory.

Tags, , , , , ,

%d bloggers like this: