Assignment due 11.01.17: Servo and LED with Processing

Part 1: Above is the code for Servo. The first code is from arduino, which sets up the servo pin and its angle range that the servo can move from and to (0 to 180). The second code is from process, which draws a scale from left to right to adjust and control the movement of the arduino. 

Part 2: Below are the codes for LED. When you press on the white box, the LED light turns on and when you press on the black, the LED light turns off. 

Arduino code: 

Processing code: 

 

Leave a Reply

Your email address will not be published. Required fields are marked *