scottbez1 / splitflap

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

Particle support #54

Closed scottbez1 closed 4 years ago

scottbez1 commented 5 years ago

Was discussing support for Particle boards with someone over email; moving to the issue tracker to make that discussion public and keep a running log of progress/pitfalls of getting a splitflap running on Particle in place of an Uno.

Assuming they can be programmed with the Arduino IDE and they have hardware spi that's at least as fast as an Uno I think it should be doable.

The control board connects to the Arduino Uno by plugging into the ISP connector (for hardware spi access) and 3 digital pins (there's nothing particularly special about the choice of those pins IIRC). It also plugs into the VIN and GND pins, but you won't need to connect those (there's a ground connection on the ISP header, so no real need for another one, but it made sense to use a 2pin header rather than a single pin header for VIN by itself) - that just allows the motor power supply to optionally be fed to the Arduino's VIN if JP1 is installed, which makes it easy to run the Arduino without a computer connected via USB.

I just remembered that you'll probably need to edit spi_io_config.h since it currently interacts with the sensor and motor latch pins using pinMode as well as direct port manipulation. You might be able to get away with a digitalWriteFast or something to replace the direct port manipulation (OUT_LATCH_PORT and IN_LATCH_PORT), since I'm not sure if there's an easy drop-in replacement on particle boards.

Also, if you try running it on a particle and the motors end up missing steps, it might be worth trying a lower top speed by editing generate_acceleration.py to increase MIN_PERIOD_MICROS, and then run it to regenerate the acceleration curve (make sure the Arduino IDE is closed because it doesn't like files changing in the background).

scottbez1 commented 4 years ago

Closing for now. No plans to add support for Particle boards at the moment.