Quote Originally Posted by tjb1 View Post
Tonight I've done some more testing with the code and a Teensy LC which will also fit the PCB with no modification. The Teensy LC has a loop time of 15.5 microsecond using "Faster with LTO" optimization and 48MHz CPU speed while the Teensy 3.1 has a loop time of 5.5 microsecond using "Fastest with LTO" optimization with 96MHz CPU speed. I also tried 120MHz CPU speed on the 3.1 but results weren't much different so I left it alone. Teensy LC is ~$12 while the 3.1 (3.2) is ~$20 so it's a small savings if someone is interested in building their own. Teensy 3.2 looks to have no benefits over 3.1 in this application so do not worry about getting it if you already have a 3.1 board.

Also some more small fixes to LCD printing where it wasn't clearing "SAVED" in certain circumstances. Tomorrow I'm going to mess around with how I set outputs to see if I can get a little more speed out of it by checking to see if it's already active, right now it's only checking voltage vs target and hysteresis and always does something to an output. Probably at the point of diminishing returns but it's a fun little project.
Another idea for your project is to send data back to the UCCNC, like the set voltage and maybe even make it setable onscreen.
Here is a nice example video of what I mean, it is UCCNC with modified screenset (NeuronTHC screenset):