Mouse Controlling Arduino LEDs
Use a mouse to control LEDs attached to an Arduino. This project uses the processing language to transmit the mouse coordinates to the Arduino, which then uses this information to turn on some LEDs. Please see the video below to see it in action.
Components Required for this project:
- Arduino UNO
- Breadboard
- 9 LEDs
- 9 x 330 ohm resistors
- Wires to connect the circuit
- USB connection cable: to connect the computer to the Arduino
- A computer: to run the processing sketch, and to compile / upload the Arduino sketch
- Processing Program installed on computer
- Arduino Program installed on the computer
Arduino Sketch
This was made using Fritzing.
Arduino Code
You can download the Arduino IDE from this site.1 | /* This program was created by ScottC on 9/5/2012 to receive serial |
The code above was formatted using this site.
Processing Code
You can download the Processing IDE from this site.1 | //Created by ScottC on 12/05/2012 to send mouse coordinates to Arduino |
The code above was formatted using this site.