The first thing I needed to do was to find a DC motor that was compatible with the Handy Board. The Handy Board is designed to work with 9V DC motors. The DC motors that I found were for 3V. The default commands to move DC motors are fd() and bk(); these commands move motors clockwise or counter-clockwise. However, applying 9V to a 3V DC motor was not a good thing, so I used the following set of commands to control the motor connected to the port 0.
motor(0, 40); // use 40% of power to move the motor clockwise
sleep(0.2); // keep it on for 0.2 seconds
off(0); // then shut it off
The above set of commands did work for our system, but we needed a stopper to stop the door from opening too much.
Tuesday, August 7, 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment