So nearly a month has passed since my last update - much has changed, not that it's too much progress towards actual pinball.
Let's look at the GUI menu to give a hint to the functions that have been added.
Live View was here before, but lots of manually configured stuff that is now dynamically generated based on later settings.
Update - as you were, not much changed here except limiting the choice of .bin files being uploaded.
Download - loads of work done here. Basically, all of the JSON files stored in the SPIFFS get scooped up and zipped for download. This means all the work done in configuring switches, coils, bindings and will be done in rules in future developments - these can all be exported and manually copes onto the SPIFFS of another ESP32 board. To DO - upload configs to SPIFFS via the browser.
Solenoid Test - looping through the coils and firing them one at a time in order.
Basic Config - as per
last post
Config Switches - extended since the last post. Now we add isStart, isCredit and isOuthole. To Do - add isTrough, but not needed in my single ball playfield just yet.
Config Coils - no additional dev done.
Config Switch Coil Bindings - This is where we can set up how coils are relates to switches. In the example below, we fire off a pop bumper immediately when the switch is hit.
We also can have a coil bound to a switch, like an outhole - but we will leave the firing events to the rules (or "code").
Once all that had been done, I have removed loads of manual code which will later be replace by rules.
So, following advice received earlier in this log - I have implemented an interrupt timer to ensure switch matrix is read once a millisecond - so 1000 times a second - this works very nicely.
I then got to the point of implementing an interrupt on the flipper switches, now this opened up a HUGE can of worms my inexperience was not prepared for. Whereas previously Alan's flipper button design handled switches nicely, it seems interrupts can be very challenging because switch presses and release events can be a real art to detect and not doing so efficiently can really break things by taking up too much processor time and crashing the ESP32 - this needs much more work and more electronics (pull down resistor - at least) than is on v1 of the PCB.