<- back
This week we had to create a user interface to interact with one of our boards. I brought my input device board to my parents' house for Thanksgiving. While it mostly survived the flight (yes, TSA allows sketchy looking PCBs on planes), the potentiometer came loose, so I quickly abandoned my initial impulse to control an interface with the potentiometer. Instead I decided to create an interface that would control my output device on that board, an RGB LED. I've spent enough time in my life struggling with Python, so I decided to use Processing and the Arduino IDE to create my application.

First, as a proof of concept, I created a gradient in Processing to correspond to the range of colors I wanted to achieve with the LED. Following Sparkfun's wonderful tutorial, I managed to get it working so that the LED would change to (more or less) the color on the screen based on the location of my mouse.

I then decided to create a more clear and engaging interface, so I used the resources on the Processing website to figure out how to create scrollbars and change the color of the screen and the serial output based on the position of the scrollbar.

Unfortunately, when I tried to implement this new Processing sketch, my board decided not to respond, and it also stopped responding to the original Processing sketch. When I got back to campus, I tried using the FTDI cable in the shop in case my cable was the problem, but that didn't help. After fiddling around with the code for another hour or so, I finally gave up on getting the Processing sketch to talk to my board. However, the initial sketch did work and the second interface works fine on the screen, so I still consider this week a success.