Polargraph server for PolarshieldSD v3
Under development! Beware minor dragons!
Added the pen width test feature back into the code. Why was it ever gone? I commented out all the features while porting it to ESP32, and looks like I forgot to put this one back in! http://www.polargraph.co.uk/forum/polargraphs-group2/troubleshooting-forum5/no-test-pen-widths-thread736.0/#postid-4153
Added some extra calls to impl_runBackgroundTasks() in the main loop to allow the touchUI to be responsive during a draw-from-SD-card. I think this effectively blocks the existing background task because it runs completely in the high-priority arduino "loop" task. I tried a few different combinations of increasing the priority of the background task, and adding some taskYIELDs in there, but didn't seem to work. This insertion of background checking into the foreground task is pretty nasty, but it solves the problem in the short term, and I want to get this functional for machines that I'm sending out today. Fixes #3, and #6 was a symptom of the same thing.
Colour schemes are now more easily changeable (030054653a28a887440d54b1f82bb716f3db52d3). This work is to support #5.
Touches on the screen now reset the inactivity countdown by default, regardless of whether they trigger an event.
Possibly addressed #2 by adding some more places that reset the inactivity countdown. I'm not completely convinced that's what the problem is, because I can't replicate it.
Added binary files into the mix. Not sure this is a great idea, but the build process
is harder than it used to be, and this is a way to solve it. Look in
for the files, and a guide to doing the flash without compiling, and see also
Replaced my adapted version of Ticker with the regular version of Ticker. My adapted version had microseconds added because I was using it to drive the motor loop, but the motor loop is synchronous/blocking so doesn't need timing.
What this is
This is a port of polargraph_server_polarshield to the Espressif ESP32 chip. I'm using this part for a few reasons:
- 3.3v native, so works with SD cards and many peripherals easily
- Expansion possibilities: wireless, Bluetooth
- Good fit for modern peripherals
The first goal of this project is to achieve feature parity with the old version. There are no technical reasons why this shouldn't be straightforward, but that doesn't mean I'm going to make it easy!
ESP32 uses a pre-emptively multi-tasking real-time operating system (FreeRTOS), so I'd like to configure most features as tasks, rather than trying to keep it all in the single-threaded model of most Arduino stuff.
Feature parity - especially norwegian pixel.v2.0.1
- Remove need to use a computer to set up a machine -
Change machine size using touch UIv2.1.0
- Set motor specs using touch UI
Set bounding box using on-screen controlsv2.1.0
- Spec'd in millimetres
- Limited by machine size + margin
- Warnings when machine doesn't match controller (connected on USB)
- Draw from raw image format on SD card
- Image bitmap a la norwegian pixel
- SVG scaled to bounding box area
- Web UI built in
The PolargraphSD v3 is based on a Polarshield v3 board, which integrates:
NodeMCU-32S 2x stepper drivers 320x240 LCD Touch panel SD card
You can buy pre-built Polargraph hardware at https://polargraph.bigcartel.com/