Home > Arduino, Robot > Arduino Action

Arduino Action

December 20, 2008

Hi there. Today I finally got some time to sit down with my Arduino Duemilanove (and motor control shield) and have a good play. Firstly I hooked up the Duemilanove board and played with a few examples (mostly just flashing LED 13 a few different ways. I did want it to flash the beat to “Everybody Dance Now” but didn’t want to spend that much time!) then got onto the task of building the motor shield.

Thankfully the motor shield works perfectly. I was able to control the steering of my robo-car with a servo connected and able to drive the car forwards and backwards using a standard DC motor connected to one of the motor controller inputs.

After that, I dove into writing  a small test program or “sketch” in Arduino language to read the ultrasonic rangefinder I am placing on the front of the car. After an hour of tweaking I seemed to have succeeded.  The sketch I wrote reads the analog pin, averages the last three readings to keep the distance a little more stable, then converts the voltage reading into a cm value. The Arduino then pipes the results out the USB serial port. The setup and output can be seen below. If anyone is interested in the code, drop me a line.

Next step, interfacing the motor shield with RoboRealm! Should be easy.

Advertisements
Categories: Arduino, Robot
%d bloggers like this: