Our Cybermaster page

Back to Anders page

Back to Johannes page

Back to Jonatans page

BlockCAD

Mail us!


Contents

Santa Claus was nice to us this Year, so now we (Johannes, Jonatan (and Anders)) have the Lego Cybermaster to play with.

The kids think it's a good set, many pieces to build with, but we all find the programming environment a bit limited.

The game robots

First we built the Crusher and Stinger robots in Colosseum, and tested the 'game'. Stinger is a hand held 'hammer' which is used to hit the sensors on Crusher. Crusher is controlled by the Cybermaster computer, and runs round randomly. When You manage to hit the side sensors the prescribed number of times it's arms open up, and You shall try to hit the central sensor.

Well... it was fun (sort of) for ten minutes.. The most entertaining part was the comments made on the PC speakers. We all loved hearing Crusher yell for 'Mama' when we were almost done with the hitting.

Our own design

Then we went to Joe's Garage and tested the 'programming'. This is a bit better, but limited. We managed to build a robot (design: us), and program it for turning when hitting an obstacle. This we have played with quite a bit.

We put two sensors in front (left and right), and one extra in the back. This one detects when the robot tries to 'climb' something, and makes it drive backwards a little and then turn.

This robot was programmed by the kids, with Cybermaster, and it can turn left, right and go backwards/turn. There was one problem though - if both front sensors are hit the motors stop (I suppose they get orders for both directions at the same time). This could not be resolved with the Cybermaster software.

More flexible programming

Luckily many people in the world have already played with their Mindstorms or Cybermaster sets for a while, and published their knowledge and add-ons.

I downloaded NQC by Dave Baum (a programming language), and RcxCC by Mark Overmars (an integrated environment for using NQC), and started playing. The result was a little NQC program that did the same as our previous Cybermaster program, but also had a test for both front sensors. Now the robot works much better. It can still get stuck though, but I will continue testing ideas I've seen on the Net, so the story is not over yet...

The memory in the Cybermaster is very small (we have circa 100 bytes left after downloading this small program), so I think I have to use a controlling program in the PC instead...

Unfortunately NQC (or VB or Delphi) is still too complicated for the kids - if You build (or find) an easy environment (that an 11 year old Swede might understand) with enough flexibility, don't hesitate - tell me about it!

A 'Lego Brick'-programmable robot

This robot is not very 'intelligent', but the fun thing with it is, that the movement 'program' is made with Lego bricks! No photos yet L , but they will come...

The robot uses the standard thread drive, and turns left/right by stopping one motor and running the other.

On top of this is a reader that interpretes the 'program' made of a long plate with bricks:

The reader consists of two sensors for the reading of the 'program', and one sensor for detecting start/end of program.

The possible commands for a 'program' are:

The 'program' plate is driven at 'constant' speed with the third (external) motor, a problem here was to get the speed low enough. We ended up using rubber bands, but that is not very reliable - the speed variations are large, and the amount of turning made by the robot is not really predictable.

The boys have played quite a lot with this robot now, making games like: One of them places a couple of 'targets' on the floor, and the other now makes a 'program'. Start the robot and count how many targets are hit by it.

The program for the robot was written in NQC. It is a very simple program, just reading the sensors and performing the action.

/* LEGO-programmable robot */

#define LEFT_MOTOR  OUT_L
#define RIGHT_MOTOR OUT_R
#define BOTH        OUT_L+OUT_R
#define PROG_FEED   OUT_X
#define ALL         OUT_L+OUT_R+OUT_X

#define TURN_LEFT   IN_L
#define TURN_RIGHT  IN_R
#define PROG_ACTIVE IN_M

#define SPEED       7

int State;

task main
{
  State = 0;
  while (1==1)
  {
    if (State == 0)
    {
      if (PROG_ACTIVE == 1)
      {
        State = 1;
      }
    }
    else if (State == 1)
    {
      if (PROG_ACTIVE == 1)
      {
        Fwd(PROG_FEED, 0);
        if (TURN_LEFT == 1)
        {
          if (TURN_RIGHT == 1)
          {
            Fwd(BOTH, SPEED);
          }
          else
          {
            Off(LEFT_MOTOR);
            Fwd(RIGHT_MOTOR, SPEED);
          }
        }
        else if (TURN_RIGHT == 1)
        {
          if (TURN_LEFT == 1)
          {
            Fwd(BOTH, SPEED);
          }
          else
          {
            Off(RIGHT_MOTOR);
            Fwd(LEFT_MOTOR, SPEED);
          }
        }
        else
        {
          Off(BOTH);
        }
      }
      else
      {
        Off(ALL);
        State = 2;
      }
    }
    else if (State == 2)
    {
      Rev(PROG_FEED, 7);
      if (PROG_ACTIVE == 1)
      {
        State = 3;
      }
    }
    else if (State == 3)
    {
      if (PROG_ACTIVE == 0)
      {
        State = 0;
        Off(ALL);
      }
    }
  }
} 

Links

Some resources I have used...

I have found much information in the newsgroups at lugnet, especially the robotics group.
rec.toys.lego is also a very interesting newsgroup.
Bert Van Dam has many interesting projects on his page, and new things pop up very often. Nice!
Andy Shaw has an interesting 'rover', and he was very helpful when I asked him for advise (Thank You Andy!).
NQC by Dave Baum is a must have!
RcxCC by Mike Overmars is a very good add-on for NQC users.

And of course there are a lot more pages and projects out on the net. Thank You to You All!


Last updated 1999-01-10