Our project this week revolved around Arduinos! I wanted to find a fun combination of sensors & outputs, so I chose to try to integrate a joystick controller to control NeoPixels.
I thought this would be an assignment that I could largely do outside of the Fab Lab since I could install the Arduino software onto my laptop, but I quickly ran into issues revolving around the fact that I didn’t know how the neopixel worked or what the different connection pins on the joystick controller were meant for.
I searched online, and Google was a great help for many of the troubleshooting steps I ran into.
This youtube video was a great help for the Joystick:
Beforehand I was connecting the X and Y sensors to the digital pins on the Arduino, and my code was trying to read the analog pins. This video helped to clear things up and gave me some starter code to work with too.
I also made use of this guide to assist me with the NeoPixel setup:
https://create.arduino.cc/projecthub/zanycadencedev/getting-started-with-arduino-and-neopixels-013360
I was still experiencing issues controlling the neopixels, however, so I came into the Fab Lab and quickly learned that the NeoPixel strip I was using had connections soldered onto the “wrong” end, since the data connection to control the pixels can only travel in one direction. After replacing the strip with a properly soldered version, I was good to go!
Admittedly, my project was less about using an Arduino to solve a problem, and more about making something cool and thinking of some use case that kind of makes sense for it.
Fidget cubes are a popular trend currently, and a joystick is often an element for a part of these cubes. I present the “Fidget Strip”, a strip of NeoPixels that can be controlled by fiddling with a Joystick!
Witness the story of a man who is stressed/frustrated, and makes use of this wonderful device to feel less stressed and more motivated to tackle the next big obstacle in his life:
While developing the code for my device, I experimented with a library example that made fun rainbow colors light up the display:
And here’s the final product! Admittedly this video doesn’t do the best job of showcasing the demo, as my color range was all shades of blues and green, and I accidentally popped off the joystick in the middle of demoing. Special thanks to my roommate, who took the video for me while I stumbled through the demonstration at 9 am:
Overall the Arduino project was a lot of fun to work with, and I look forward to next week!
Here’s the code for my final demo:
https://pastebin.com/ehLupDqh
And the code for the project we did in the lab session:
https://pastebin.com/RHEY7qHH
Oh, and because I love to just post all of the pictures, here’s some close-ups of the device setup:
The arduino setup, utilizing both analog and digital pins
The inputs for the Joystick, I chose not to hook up the SW pin since I didn’t use the feature for the project.
These are the NeoPixel connections, with the data pin working in the correct direction.
and here’s another view of the arduino.