Geronimo - Simple robot that navigates around

My first robot is “Geronimo” and it is a simple autonomous robot with an ultrasonic sensor for obstacles avoindance.
This robot can be built by a newbie of robotics.

The robot, very basic and simple, goes straight and verifies if there are obstacles. If it found some obstacle, it turns the ‘head’ and sees at the right and at the left in order to verify where the street is more free. Then it goes where the street is more free. Nothing of special, but it was my first robot!

Navigate around with ultrasound

  • Actuators / output devices: Continuous rotation servo
  • CPU: Arduino Duemilanove
  • Power source: 6x1, 2=7, 2V and 9V for Arduino
  • Programming language: C++
  • Sensors / input devices: URM 37 Ultrasonic sensor
  • Target environment: indoor flat surfaces

This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/geronimo-simple-robot-that-navigates-around

Looks good!I think, that if

Looks good!

I think, that if you have the servo turn a bit slower, it will be more accurate in it’s readings, making less false turns

good job!

do you have some type of motor controller?

No motor controller. The

No motor controller. The servos are wired directly with arduino. The power is done by 5x1.2V batteries.

Do you know a method to

Do you know a method to control the servos speed? interesting!

Yeah a for loop works

Yeah a for loop works. This is just a little example I wrote for you. It will show you how to slow the servo so you can write something similar for your bot.

 

void loop(){

servo.write(0);  //move the servo to the angle 0

delay(700);      // wait for the servo to move to angle 0

for( int x=0; x<=180; x++){   // This will loop 180 times

servo.write(x);            //set the servo to angle x

delay(10); // play with this delay value that will slow the servo

}

}

Thanks, but I already use

Thanks, but I already use this program structure (http://robottini.altervista.org/robot-with-obstacle-avoidances/)

 

 for (ang=0; ang<180; ang +=5) // obstacles control
{
uservo.write(ang); // set ultrasonic sensor on ang value
urm.requestMeasurement(DISTANCE); //ask for new reading
delay(20);