Week #03
I went with a gesture sensor for my game controller. I started by just using the example file for the gesture, and then added some functionality for LEDs that would serve as indicators of which gesture was activated (code). Then I moved on to the networking part.
I used the code from class and combined it with the gesture code. For some reason the gesture code stopped working after that, but I've found another example that uses slightly different naming for the gestures that seemed to work.
I made some adjustments in the code to fit my needs (available on github), added the pushbutton and another LED for communicating the connection status as was suggested by the original code.
After I made sure it was working as expected I decided to try and make an enclosure for this thing. I thought it would be fun. Little did I know...
Lots of soldering and three cardboard versions later, it wasn't working right (I was too focused to take enough videos / photos... sorry). I was sure I burned something while soldering, went over all the connections with a multimeter and checking all the LEDs with a coin battery. Everything seemed fine — the network part was working, but the sensor or the LEDs weren't.
Well... I'm almost embarrassed to say — the issue ended up being a shadow cast from the cardboard onto the sensor, hindering its ability to detect the gestures (= a change in light coming in). That's it. A shadow. I then made one last cardboard version that exposed the whole sensor (something I was trying to avoid) and... it worked.
I'm not sure how well it'll work in a class-wide game, it's definitely not the easiest game controller. But with some adjustments to the sensitivity and timing in the code and some practice it doesn't work bad at all. There's just something about moving your hand without touching anything and affecting what's on someone else's computer that feels nice.