The Ticker Library

A project log for Not Grbl

Well the Grbl Firmware for the Arduino is great. It's so good that why bother writing your own? Other than for the hell of it!

agp.cooperagp.cooper 09/02/2016 at 09:000 Comments

The Ticker Library

The code in "Not Grbl" does not use any hardware timers because I want to eventually migrate to the EPS2688 and the hardware on this CPU is not well documented (unlike the AVRs). The code use "Blink without delay()" type code. On an Nano the code loops through at a rate of about 8 kHz. Plenty fast for a gCode interpreter/stepper controller.

As the Ticker Library works on the EPS2688 series of boards (I have a WeMos D1R1 and an EPS-12E), I thought I would have a look.

I tested the code on my Dalek motor/sensor board. It worked but not as expected. Basically the Library uses the millis() routine to manage/schedule the attach class. It is not interrupt based. So it basically it is "Blink without delay()" type code. So don't add a long delay() in anywhere if you use it. It is very tidy and nice to use but as I use micros() rather than millis() in "Not Grbl". It is therefore not a suitable library for use at present.