Campus Ambassador, Software Engineer and University Relation MiKo's Blog

Thursday Jun 19, 2008

Month ago I started to write article about binding Servo to the SunSPOT eDemo board. But I forgot to post it. I want to remedy this. Connecting any servo is really easy. You only need to address right pins on the demo board and after do that you can use writtend class Servo. Class Servo is placed in the package
com.sun.spot.sensorboard.peripheral you have to also address right PIN by who you will control your servo. For do this you will need to import other package

import com.sun.spot.sensorboard.EDemoBoard;
example: serv = new Servo(EDemoBoard.getInstance().getOutputPins()[EDemoBoard.H2]);
Now you can use Servo methods getValue, setValue, setPosition ... to controll your servo.

this is the program but what about real binding ?  You should prepare peaces of wire. Connect your sunspot with servo by ground connector, Than connect wire with SunSPOT's pin H2 (on eDemo board) and your Servos controller cable (yellow). Also you should connect two pins together on the eDemo board PINs  +5V and VH. The last thing is connect your servo with power supplier 5V.

Isn't it easy ? :) after all this you can see something like on the movie below.


Comments:

Post a Comment:
  • HTML Syntax: NOT allowed