There’s a technical solution to this, but be warned that it’s a costly and fussy option. Making this work requires more improvised McGuyver tech and craft than the rest of the project. Fortunately you can build the project without it and still have a lot of fun, then add it later if you want.
First, the light bar must be attached to some sort of wheeled motion base…bicycle, stroller, wheelchair, whatever you have access to. That’s the easy part. Then one must interface a positional encoder — an accurate motion counter – to a wheel. This isn’t like a bicycle speedometer where the speed can be extrapolated from a magnet once per turn…no, we need right now precision, an exact count.
Whatever you choose, it must have excellent resolution. The NeoPixels on a 144 LEDs/meter strip are spaced just 7 millimeters apart. A coarse encoder that can read only a few pulses per revolution simply won’t cut it.
If you’re really crafty, it might be possible to gut an optical “chopper wheel” from an old ball mouse (remember those?) and drive it from a larger wheel with a belt or gear system.
The encoder output must connect to digital pin #5 on the Arduino Uno. This pin can be used as an input to Timer 1, so the exact same code that normally relies on regular timer intervals now uses pulses from the wheel instead.
The encoder also requires a +5V and GND connection. One output is used (channel A or B), the other can be left unconnected.
To enable the encoder feature, un-comment this line in the code:
When using the encoder feature, the speed dial will have no effect. It’s still used at startup for setting the image brightness, but isn’t involved in timing the image playback.
You do not need to go get a folding bicycle to do this! They’re pricey. Root around the house, see what you have around or can source at a secondhand store. Razor scooter? LEGO wheels? TV cart? Fisher Price “Corn Popper” toy?