Compare as many tool options as possibleIndividual Assignment:
Write an application that interfaces with an input &/or output device that you made
After looking through the different intreface applications in our group project, I did decide to go with Processing. (Also, Neil's quote in the video, which I explicitly wrote down was "If you are feeling overwhelmed" Processing is what you should use. That sounded about right to me...)
I went to the Processing website and downloaded the Processing Application. I had NO prior knowledge or experience, so I decided to start with some tutorials. There are TONS of useful tutorials at this site, and I decided to start with the very basic ones.
I started with "Hello Processing", an hour long BASIC tutorial that really helped me see what Processing was capable of and how to write basic Processing commands. The presenter of the tutorial used a lot of commands that I didn't even know existed (like "MousePressed" as a state in the Processing Canvas) and I started wondering if there was a list of such commands. Turns out there is, and I found it here. Every command you could ever need and more! I worked through the hour long tutorial and learned a ton. (I declined to print the "Hour of Coding" certificate that I earned, though.)
I then started thinking about how to make Processing work with Arduino, so I searched for a video on that. I watched one short one but I think I might also watch another later.
At this point, I thought I was ready to start trying to do some interfacing. (Reader, I was wrong.) I decided to start with some examples. I quickly realized (labmate Will Rudolph helped) that Firmata might be helpful, so I downloaded and installed the Firmata library into Processing. Firmata came with some examples for input, and output, so I decided to try to work through those. First was the input example. I hooked up a light sensor to my board and used the default Processing example. That worked and made blue circles that got bigger and smaller depending on how much light was incident on the sensor. I decided to tweak it a bit to see if I could make it do something different. I learned how to change the circles to rectangles and I changed the number of rectangles that there were and the color of the fill. Videos of this process working are below.
Next, I decided to try going the opposite way, where something that I changed or accessed on the computer screen changed something on my board. I hooked up 3 festive LEDs on my board and downloaded the default Processing example for Output. It worked. When I clicked on the blue rectangles with my mouse, the LEDs would toggle on and off. I again modified the code just to make sure that I could, by changing the blue rectangles to yellow circles. I also changed the size of the canvas that the circles were displaying on. I wanted to be sure I knew how to change the parameters as needed.
After working through the examples and changing and tweaking some things, I originally thought I was done. However, I didn't feel like I really grasped what was going on and I wasn't sure I could write something "from scratch" or even from a skeleton example, since I had just tweaked things before. I watched another video tutorial (linked below) that really made me feel confident I could so something. I should know by now that that feeling is a harbinger of doom.
It turned out that the tutorial I watched was from 2011, for a much older version of Processing, and that things had changed quite a bit in the newer versions. However, I persisted, and working from parts of that video, and parts of another tutorial, I cobbled together something that worked!! I was so excited. My mostly original example uses a potentiometer hooked to my board that changes the background color of the canvas.
Overall, this week was pretty interesting. I liked using Processing to interface with my board because it was cool to see that something outside of my computer made something happen on the screen, or vice versa.