ArduinoLab6
In lab 5 we sent information from the Arduino to your PC via the serial port. In this lab we will be going in the reverse direction--sending information from your PC to your Arduino. Like in the previous lab, this lab will consist of a Processing program running on your PC and a program running on the Arduino. This lab is from "Getting Started with Arduino" by Massimo Banzi.
Brief description.
The Processing sketch grabs the text from a website (the default website is the sandbox on our class wiki. I will give the edit password for it in class so you can alter counts). It counts the number of occurrences of the words peace, love, and piano and converts those counts into values for red, green, and blue (RGB). The Processing sketch sends these RGB values to the Arduino. The Arduino uses them to alter the brightness of a red, green, and blue led.
The lab combines a lot of what we already worked on:
- the pushbutton (lab 2)
- the light sensor (lab 4)
- PWM LED control (lab 3-out)
- serial communication (lab 5)
The Processing Component
Copy the Arduino Lab 6 Processing Code to a blank Processing editing window and save it. Before you can run the sketch you will ned to generate the font it uses. To do this, while the sketch is still open, select from the Tools menu Create Font. Select the HelveticaNeue-bold font and select 32 for the font size and click ok.
The Arduino Component
Here is the layout of parts.

The Arduino Code
Copy the Arduino Lab 6 Wiring Code to a blank Wiring editing window.
