In response to Kongorilla’s request for cleverer pixel skipping routines, I’ve just uploaded some new code.
Note, if you’re going to use the controller, you also need to update the firmware too.
v1.1.6 Controller binaries / Controller source code
Firmware source code for arduino with adafruit motorshield / for arduino with serial ITead motorshield / for arduino mega
1. Pixel skipping.
Skipped pixels are ones that are masked, or that are outside of the brightest/darkest thresholds. Normally skipped pixels are simply omitted from the command queue – they just aren’t transmitted, and this is fine for ones around the outside of an image. It does mean though, that skipped pixels that are in the centre of an image get drawn as blanks – a line through them as the pen trundles towards the next drawable pixel.
So this is changed now: The default behaviour is now to lift the pen while moving over skipped pixels. For one reason or another, it does mean that even skipped pixels get transmitted so it might take longer, but the pen will be up during that time. You can still go back to the old continuous-line way by choosing the other option in the dialog. I believe this still works as before.
This works best if you use it in conjunction with masking and reducing the brightest pixel threshold a bit to weed out the false positives that are not completely blank, but are nevertheless too bright to be expressed by the machine as anything other than a straight line.
2. Faster communication
With this release (v1.1.6) I have switched over to using a CRC-based system to verify the integrity of the command. Each command has a checksum appended to it when it’s transmitted, and when the machine receives it it recalculates the sum and if it matches what’s on the end then hurray, the command was not corrupted. If it doesn’t match, then it will signal to the controller to resend the last command. This is twice as fast as before, so that’s good. But it’s not compatible with the old way of doing it. Well, it might work, but it probably won’t.
How it used to work: Basically the controller used to send a command, then the machine would acknowledge it by sending it back, and the controller would check to see if it came back unchanged, and if it did then it’d conclude the message was properly transmitted and send a final execute command. It was fairly safe, but it was slow because there are three messages exchanged for every command.
I put it in as a response to some dropped pixels I was having back in the day, where every couple of hundred commands, one would get truncated or mangled for some reason.
I’m off on holiday for a few days from tomorrow, so if it all goes wrong, goes on fire or destroys your drawings, please wait until next weekend to be cross with me.