scottbez1 / splitflap

DIY split-flap display
https://scottbez1.github.io/splitflap
Other
3.09k stars 256 forks source link

Chainlink: Magnet check #198

Closed gorwah closed 8 months ago

gorwah commented 2 years ago

If I’m making a chainlink system (no Arduino), then how do I check that the magnet is in the right direction?

mattsains commented 2 years ago

I had the same question. Looking at the code, I think you can set SENSOR_TEST to true in arduino/splitflap/Splitflap/config.h and upload to the device using platformio and the chainlink env. You connect the sensor to the chainlink board as you would in the final assembly. The esp32 will output the state of the first five sensor ports over serial.

I'm unable to test this because my chainlink boards have not arrived.

gilles-yvetot commented 1 year ago

@mattsains that's what I have done and the program runs, I think it prints 0 when the magnet is not detected. I have not been able to make it display 1 though

scottbez1 commented 8 months ago

Setting SENSOR_TEST should work as https://github.com/scottbez1/splitflap/issues/198#issuecomment-1078515102 mentioned, or an easier approach would be to send % via serial to toggle between sensor test mode and normal mode.