Instead
of using a potentiometer to control a servo, i will use in this case
a mouse.
In
order to send a value to the Arduino, depending of the mouse
movements, I have to make a short program which will run on the
computer side.
To
create this program, I will use a development platform called
Processing. It is Open Source, easy to use, and specially made for
interaction and animation. Actually, the programm Arduino is based on
Processing.
For more
info: http://processing.org/
So,
I will have on code, running on Processing, sending the value to the
Arduino, depending of the mouse position, and another code, running
on the Arduino, to control the servo depending of the value received
through the serial port.
I
wil use:
-
My computer (and the mouse)
-
The Arduino
-
The USB cable and some simple wires
-
The steering servo of the Kyosho car
As
we do not use any potentiometer anymore, the servo will be directly
connecter to the Arduino. +5v pin to the red wire, GND to the black
wire (here brown), and the pin to the white wire (here orange).
Aucun commentaire:
Enregistrer un commentaire