So the idea was to have the LEDs light up whenever I took a step.
We took 3 different examples and Frankensteined them together to make the code that is available on GitHub.
The examples we used are:
Adafruit Neopixel > strandtest
Adafruit Circuit Playground > external_neopixels
Adafruit Circuit Playground > accelTap
The Circuit Playground board comes with an accelerometer and we used the code from the accelTap example to detect a "tap" or in our case a foot step. We added an interrupt.
I chose the theaterChaseRainbow in the strandtest example as the color pattern I wanted whenever the LED strip lights up.
The external_neopixels example is to set the colors for the onboard LEDs.
To change the timing so it matches my gait I just changed the amount of times the pattern repeats itself. I set it to 10 times and later changed it to 6 times.
There is a GitHub link to the final code!
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.