Since this is a Harry Potter themed hackathon, I felt the need to create something matching the theme that allows us muggles to get a taste of what it's like to be a wizard.
What it does
When the user moves the wand, the 7 LEDs change colour and pattern depending on it's orientation. Requires some enthusiatic acting and imagination.
How I built it
This uses an Arduino Uno, an accelerometer, 3 breadboards, 7 neopixels and a portable phone charger. I used code from an existing project featuring a wand that controls a tv, and edited it to fit the LEDs and the effects I wanted. Accelerometers are notoriously inconsistent so it took some time to get the numbers right- they were usually very different than the original code.
Challenges I ran into
Initially had some issues getting the LEDs going before realising I used the wrong resistor (took far too long to realise). Getting the values right took time. The main issue I am still dealing with is the consistency of the accelerometer- it sometimes gives off random numbers as feedback, which in turn calls functions at the wrong time. Because of this I had to remove a (very pretty!) rainbow function, as it was getting called randomly.
Accomplishments that I'm proud of
Proud I got it all done in a reasonable time before the deadline! It's not my most ambitious project but it was a bit of fun.
What I learned
I've never used an accelerometer before so I learned how the values are read and used. I also learned a bit more about the neopixel library- mainly that it will be very difficult for me to write my own patterns for my LEDs.
What's next for Hacking is Magic
I would have loved to have taken this off the breadboard and onto an actual wand, but due to time and soldering constraints that was not to be. It would definitely be fun to do that in the future.