Disclaimer
This page is not connected with or endorsed by

The LEGO Company.

LEGO, LEGOLAND, LEGO SYSTEM, LEGO TECHNIC, DUPLO, LEGO PRIMO and LEGO MINDSTORMS are trademarks of The LEGO Company. 

 

 

 

 

Home

NXT Robotics

 

NXTAPOD

Single-motor walking & turning hexapod

 

Daniele Benedettelli,

Nov 2009

 

 

 

 

This simple hexapod robot can walk and reverse-turn using just one motor. It can detect obstacles using the ultrasonic sensor.

 

The programming is really simple: the robot steps forward until the Ultrasonic Sensor measures detects a nearby object, then it reverse the motor direction and a clever escapement mechanism allows the backward-turn maneuvre, driving just one row of legs.

Here's the latch mechanism that does the trick:

 

 

 

 

 

You can build this robot with a single

LEGO MINDSTORMS NXT 2.0 set.

 

 

 

 

 

 

 

 

CLICK TO DOWNLOAD BUILDING INSTRUCTIONS!

 

Connect an ultrasonic sensor to input port 4,

and the motor to output port A. The minimal NXC code is as simple as:

task main ()
{
   SetSensorLowspeed(IN_4);
   while (true)
   {
      OnFwd(OUT_A,100);
      Wait(1000);
      while (SensorUS(IN_4)>20);
      OnRev(OUT_A,100);
      Wait(2000);
      while (SensorUS(IN_4)<40);
   }
}