Feature: Add Arduino lighting driver

As another option for people setting up SM5.3 setups with lights, I feel like an option for an Arduino-based lighting driver would be a great addition, especially given how common and widely used Arduinos are.

The SextetStreamToFile driver can be used for this currently, but in my opinion isn’t ideal for an Arduino because the user needs to explicitly set up redirecting the lighting output from Stepmania to the Arduino themselves (i.e. on Linux, they need to create the fifo file for output, and then manually redirect the output using cat/socat).

Ideally, an Arduino lighting driver would make lighting easier to get set up and work more reliably:

  • Since most Arduino models show up as a serial port on Windows/Linux, sending lighting data could be done through Stepmania instead of needing the user to manually redirect the lighting output by hand (as you have to do currently via SextetStreamToFile). You could specify the COM port/device name the Arduino is hooked up to in Preferences.ini, or have Stepmania try and automagically detect where the Arduino is plugged in (which would be nice in case said COM port ends up randomly changing).

  • On the Arduino side, example code for how to interpret the data sent from Stepmania and turn on/off lights would be great. Format-wise, I think the current format SextetStream outputs data in works well for this, but it could be changed/expanded if needed.

  • The Stepmania/Arduino protocol could be expanded on in the future to allow for a lot of other things (pad/button inputs, card readers, etc), but that’s another feature request for another post.

  • Most importantly, if the Arduino isn’t plugged in or can’t be reached, Stepmania should start up anyways and ideally try and reconnect to the Arduino if it gets plugged in while the game is running (currently, SextetStream freezes Stepmania on an unhelpful blank loading screen until a program starts reading the lighting output, at least on Linux anyways).