English (United Kingdom) Hebrew

Mambo Reference Manual

Contents

Mambo overview

Mambo is a robotic system designed to develop multidisciplinary logical-engineering thinking, raising interest in math, programming, electricity, physics and artificial intelligence among students.
The Mambo robot kit is comprised of a robot body, a controller, DC motors, front wheels attached to the DC motors, a free back wheel, misclanous sensors, etc. Two short cables connect the motors to the controller's motor channels, and 4 long cables are provided for connecting the sensors to the controller general I/O channels. Also included in the robot kit is a 7.2V rechargeable battery pack and a charger.

Also included in this kit are robotic claws, temperature sensors, analog light sensors, personal pad, etc. The class kit contains Robotraffic (class) pad, traffic lights system with own controller and battaery pack, etc.




Controller overview

The controller is the actual "brain" of the robot - it is responsible for reading input from its channels, for analyzing the input signals and for running the robot actuators (motors). The controller contains the following:
  • 1 USB connector
  • 1 battery connector
  • Power and reset buttons
  • LCD textual screen, of 2 lines and 8 columns
  • 4 general purpose I/O channels
  • 3 PWM motor channels, of which 2 support high current DC motors
  • 1 Built in led
  • 1 Built in push button
  • 1 Built in buzzer
  • A transparent cover





Operating the Controller

The controller may use either of two power sources: USB or battery. The rocker button at the top of the controller is used to select the power source - when pushed towards the battery connector, battery power is active, and when pushed towards the USB connector, the USB is active. Note: if the button is pushed towards the battery, and no battery is connected, then the USB is used as a power source.

The USB connector is used for connecting the controller to the computer. The Mambo software uses the USB connection to upload the user programs to the controller.

I/O Channels

The robot's controller has 4 channels, used for both input and output. Input may be analog or digital(0/1), while output may be only digital (0/1). The channel type can be set using the IDE by pressing the toolbar "Channel settings.." button.

Note: When set to analog mode, channel input range depends on the IDE in use. In Mambo Drag-and-Drop IDE, the input range is 0..100, while on the Mambo C/C++ IDE the input range is 0..1023.

Motors and motor connectors

The controller contains 3 PWM motor connectors at its bottom part, of which 2 (on the right side) support high DC motors. Thus, in a normal configuration, the 2 right motor connectors (marked as motor1 and motor2) are connected to the DC motors, while the third (marked as "ex") is used to control servo motors, such as in the robotic claws.

For the DC motors (motor1 and motor2), the range of values is -100..+100. A 100 value indicates 100% electrical power forward direction, while -100 value indicates 100% electrical power backward direction. Writing a 0 value to a motor will cause it to stop.

Note: any of the 3 motor connectors may be used for input as well, if not used for output.

Built in LCD

The built in LCD screen is located in the center of the controller, and is used for printing textual information using the print command. It has 2 lines and 8 columns, and a new print command causes an automatic scroll. For clearing the screen simply print empty string ("").

Built in Led

The built in led is located at the bottom-right corner of the controller, under the buzzer. It is a 0/1 output only device, writing to it "1" turns it on, while "0" turns it off.

Built in Buzzer

The built in buzzer is located near the bottom-right corner of the controller, above the led. It is a PWM output only device, accepting a frequency as a value.

Built in Button

The built in button (black button under the LCD, marked as "button1") is an input device returning "1" if it is pushed by the user or "0" when not pushed.

Sensors

Mambo robotic systems contain sensors of many types:
  • Light sensor - an infrared sensor with a tuning trimmer, returning "1" when receiving amount of light above a certain value (determined by the trimmer) and "0" otherwise. Used for both line following and (red) traffic light recognition.
  • Object/obstacle sensor - an infrared sensor returning "0" when an object/obstacle is within 10cm distance from it, "1" otherwise. Used for recognition of an object/obstacle in from of the robot and for avoiding crush into it.
  • Touch sensor - a micro-switch sensor returning "1" when pushed down and "0" otherwise. Used for recognition of an object touching the robot.
  • Analog light sensor - same as above light sensor, but with no trimmer. Returned value is in the amount of light received in the range 0..100.
  • Temperature sensor - an analog sensor returning the ambient temperature. The returned value is measured in Celsius. To use this sensor, use the function temperatureSensor() found on the function tab, under "sensors" section.
  • Additional sensor included in the kit: ultrasonic sensor. The returned value is in centimeters. To use this sensor, use the function 'ultrasonic()' found on the function tab, under "sensors" section.

Robot Structure

The Mambo structure was built with pedagogic considerations in mind: it is mostly transparent, just like the controller cover, so that inner parts can be seen and shown to students in class. It is built of transparent plates and of poles, together forming a stable structure for robotic missions.

Special clips are used for connecting robotic parts to the mounting poles. This click system makes it very easy to change parts locations and to hang sensors almost anywhere and in any direction.








Robotraffic pad and Traffic Light system

Mambo robotic system contains components for working in a robot traffic area, including big pad and traffic light system. For a full explanation about this system is Robotraffic system.

Mambo Drag-and-Drop IDE

The drag-and-drop IDE is a simple structured programming environment, used to write robotic programs and to upload them to the robot. The programming of the various controller parts is straight forward: to program any part of the controller you simply drag it to the editing area and drop it, assigning a value to it (on writes) or reading its value (on reads).

Available commands (bottom menu):
  • if - a conditional instruction
  • while - a while loop instruction
  • loop - a count loop instruction
  • wait - a wait (no. of seconds) instruction
  • print - a print (to controller's LCD screen) instruction
  • "#" - a comment (not executed line)

Sample Programs

  • Hello World:
 
print "Hello World!";
 
  • Motor test: running both motors in 100% - fast forward
 
motor1.value=100;
motor2.value=100;
wait(3); # wait 3 seconds
motor1.value=0; # stop motor1
motor2.value=0; # stop motor2
 
  • Motor test: turn left
 
motor1.value=100;
wait(3);
motor1.value=0;
 
  • Motor test: turn left in place
 
motor1.value=100;
motor2.value=-100;
wait(3);
motor1.value=0;
motor2.value=0;
 
  • Sensor test:
 
while (true)
	print ""; # clear screen
	wait (0.5);
	print channel1; # read and print channel1 value
	print channel3; # read and print channel3 value
	wait (0.5);
 
  • Led test - blink:
 
while (true)
	led.value=1;
	wait (0.5);
	led.value=0;
	wait (0.5);
 
  • Button and Led:
 
while (true)
	led.value=button1.value; # if buttons is pushed led is on, else led is off
	wait (0.5);
 
  • Buzzer test:
 
buzzer.value=523;
wait (0.1);
buzzer.value=587;
wait (0.1);
buzzer.value=659;
wait (0.1);
buzzer.value=698;
wait (0.1);
buzzer.value=784;
wait (0.1);
buzzer.value=880;
wait (0.1);
buzzer.value=988;
wait (0.1);
buzzer.value=1074;
wait (0.1);
buzzer.value=0; # stop buzzer
wait (0.1);
 
  • Servo test: connect the claws servo to the "ex" channel, and move it gradually 80 degrees back and forth:
 
Number delay=0.015;
print "servo test";
for index in 0..3 times step 1
	print "close claws";
	for index2 in 80..1 time step -1
		ex.value=index2;
		wait (delay);
	wait (3);
	for index2 in 0..80 time step 1
		ex.value=index2;
		wait (delay);
	wait (3);
 


Mambo C/C++ IDE

Mambo C/C++ IDE is a powerful environment for working with Mambo robotic systems, giving the programmer a full control over the controller. This is an Arduino variation, designed to support Mambo robotics.

MamboC++ IDE Syntax is a C/C++, with a partial support for object oriented programming.

For documentation and help of Mambo C/C++ go to help menu within the application.