Lab 6: Serial Communication

Date: 3/17/17

Professor: Antonius

For this lab we practiced converting serial communication from Arduino to Processing and vice versa. The actual prompt for this lab was pretty broad, allowing for a lot of creativity in exactly how to implement it.

My original thought was to use my pre-existing mario animation and instead of binding the movement of mario to keyboard keys, to map it to the input of a potentiometer. I did that, but I couldn’t figure out the speed of it well and ended up trying a different project as I didn’t feel like troubleshooting it.

Instead I ended up making a wave generator. The processing code took in a value from the connected potentiometer. It then set that value to the y-value of the draw function. The x-value was naturally accumulating each frame. Once the x made it all the way to the right, the screen would wipe. It doesn’t make too much sense in text, but the video below should explain it better.

Overall, this was a pretty simple lab based around putting what we learned in class into actual use. I feel like I don’t totally understand serial streams yet, but debugging this work has helped out a lot.

Leave a Reply