SERIAL COMMUNICATION LABS / by Maya Pruitt

For these labs we learned that Arduino can not only extend to the physical world, but it can also communicate with your computer. Here comes the internet of things!

SERIAL INPUT

We first learned “Serial In”, meaning the Arduino will receive input or values from a sensor and communicate that information to the computer. Specifically, this is done in p5.js, a javascript library.

Computer reads potentiometer values and changes the background color of the canvas accordingly:

SERIAL OUTPUT

“Serial out” is the opposite of the above lab. This time information from the computer will output to control something on the Arduino. The mouse location on the canvas determines the brightness of the LED.

serialOut_LED.gif