Skip to main content

Write GCode files from Processing

I've written an example program and a class to handle writing ASCII GCode files from Processing.  It is minimal.  It does not have any start up routines for specific machines.  It does have line numbers and CRC checksums.

The code is available on GitHub. 

Popular posts from this blog

DIY Planar Magnetic drivers, part 1

I've been putting together some planar magnetic loud speaker drivers.  There is a wealth of information available at, particularly in this thread.   Inner Fidelity have a nice write up on planar magnetic drivers.  Euwemax documents his DIY planar magnetic drivers for headphones, and he uses etching as his principle method.  I thought I'd attempt to build some using enamelled wire and embroidery hoops.  This post documents my progress so far.  I've made working prototypes, but at the moment the sound is clipping.

Arduino, Smooth RC Servo Motor Control

When using the arduino Servo.h library, you normally use myServo.write(), but you can use myServo.writeMicroseconds().  This lets you write out the controlling squarewave period in microseconds.  The rc servo standard is typically 1000us <-> 2000us, with 1500us as neutral position.  This means that you have a resolution of ~2000 individual steps, rather than the 180 (degree) steps the normal write() would provide - and therefore, the potential for significantly smoother servo motor movements. 

Check out:

Here is the test code I have used to good effect so far, I have been using servo motors with an extended range of uSeconds.  Currently using one pot to set the target position, and the second pot to change the ramping/smoothing fraction.  Ramping/smoothing is done with a technique called easing (see here) which means continually adding a fraction-of-the-difference between target and current position.  See below, very simple…

DS1307 woes, I2C freezes and locks arduino

I've come across a problem with the DS1307 real time clock module and I thought I'd share my work around solution.