serial communication workshop—Katie Yan(Marcela)

Date: 11/26

Documented by: Yuhui Yan

Instructor: Marcela

Fellow: Jiwon, Nick

Aim: Learn more about the serial communication between Arduino and Processing.

Experience: This Sunday, we learn more about the serial communication. The definition of serial communication in my mind is a communication that reading from one electronic device and then sending  the data to another device in form of bits. So during the class, we learned how to send data in a mutual way. Since Arduino uses different computer language with processing, so Jiwon and Nick taught us a lot about  how to write same data in different formats to build the communication. We start from how to write data:

char a=‘a’

char myName=“Jiwon”;// wrong

string myName=“Jiwomn”;// processing

char[] myName=“Jiwomn”//Ardiuno

Process:

A to P

After we finished the circuit, we send the value from the push bottom(0or1) to processing. when we push the button, the background color in processing turns white (in code is when sensorValues=1); otherwise, the color is black (when sensorValues=0). Besides, when we rotate the potentiometer, the yellow circle on the screen will move in the different directions. In order to maintain this movements, we use the function”map”.

P to A

(without buzzer)

In P to A, we sent RGB values to LED light. And then we created three rectangles on the screen (red, blue and green) and we used MouseY position to control the color of the LED light when we move among the three color rectangles.

 

reference: workshop PPT

 

Leave a Reply