Wednesday 13 November 2013

Been quiet around here, for a good reason

I have just immersed myself in the microcomputer called the Arduino. This is a very flexible single board computer with an excellent program development system running on my Mac.

The Arduino has lots of input/outputs, six of which can be used as analog inputs for measuring voltages of 0-5V. All I/Os can be used for digital input or output. Six of the digital outputs can output PWM signals to emulate an analog output. This is the board:

Screen Shot 2013 11 13 at 16 21 03

Along side this I have purchased a "Starter Kit", looks like this:

Kit box

Inside is everything you need, and more, to do a series of practical experiments, complete with a book giving full and simple instructions.

Inside box

Anyone could grasp microcomputer programming with this kit. But to help Arduino has an excellent web site at arduino.cc.

My robot

After I had done all the exercises and learnt how to program, I then purchased a one wheel robot chassis and a RobotMotor driver board which plugs on top of the Arduino. I wired this up to the drive motor, steering servo, an ultrasonic range detector and a couple of LEDs which show the steering direction. The robot looks like this:

One Wheel Robot

Programming

Now comes the tough bit! Writing a program to make the robot do something. A simple robot like this with only one sensor, for range, capable of measuring from about 2 - 200 cm. Based on this input I wanted the robot to roam around the room, and avoid crashing by backing up when it got closer than 20 cm to anything. It should roam around in a random pattern and back up in a sensible way.

The latest code is in the post above.

No comments: