Barobo
PortalSign In
HomeShopTutorialsFree CurriculumHour of Code
RoboBlockly for Learning Math and Coding

Piano
Linkbot Image Mindstorm Image Cursor Image
0x48362412-12-24-36-48y48362412-12-24-36-48
Grid:
Tics Lines:
Width px
Hash Lines:
Width px
Labels:
Font px
Trace Lines:
Robot 1:
Width px
Robot 2:
Width px
Robot 3:
Width px
Robot 4:
Width px
Labels: x-axis y-axis Show Grid
Grid: 12x12 inches 24x24 inches 36x36 inches
72x72 inches 96x96 inches 192x192 inches
Quad: 4 Quadrants 1 Quadrant 1&4 Quadrants
Units: US Customary Metric
Background: Background Image

Robot 1

Linkbot
Mindstorm
Initial Position:
( in, in)
Initial Angle:
deg
Current Position: (-36 in, 0 in)
Current Angle: 0 deg
Wheel Radius:
Track Width:
in

Robot 2

Linkbot
Mindstorm
Initial Position:
( in, in)
Initial Angle:
deg
Current Position: (36 in, 0 in)
Current Angle: 180 deg
Wheel Radius:
Track Width:
in

Robot 3

Linkbot
Mindstorm
Initial Position:
( in, in)
Initial Angle:
deg
Current Position: (0 in, 24 in)
Current Angle: 0 deg
Wheel Radius:
Track Width:
in

Robot 4

Linkbot
Mindstorm
Initial Position:
( in, in)
Initial Angle:
deg
Current Position: (0 in, 36 in)
Current Angle: 0 deg
Wheel Radius:
Track Width:
in
Two Cars Roundabout
/* Code generated by RoboBlockly v2.0 */
#include <linkbot.h>
double r;
double d;
CLinkbotI robot1;
double radius1 = 1.75;
CLinkbotI robot2;
double radius2 = 1.75;
double trackwidth1 = 3.69;
double trackwidth2 = 3.69;
int count;

// r is the radius of the circular roundabout
r = 18;
d = 2 * (M_PI * (double(r)/360));
robot1.setSpeed(8, radius1);
robot2.setSpeed(8, radius2);
robot1.driveDistanceNB(18, radius1);
robot2.driveDistance(18, radius2);
robot1.turnRightNB(90, radius1, trackwidth1);
robot2.turnRight(90, radius2, trackwidth2);
robot1.moveWait();
count = 0;
while(count < 90) {
  robot1.driveDistanceNB(d, radius1);
  robot1.turnLeftNB(1, radius1, trackwidth1);
  robot2.driveDistanceNB(d, radius2);
  robot2.turnLeftNB(1, radius2, trackwidth2);
  count = count + 1;
}
robot1.turnRightNB(90, radius1, trackwidth1);
robot2.turnRight(90, radius2, trackwidth2);
robot1.driveDistanceNB(18, radius1);
robot2.driveDistance(18, radius2);
robot1.moveWait();
Load Blocks
Hardware
LArduino
Workspace Show Ch Save File
Problem Statement:

The pre-placed blocks drive the two linkbots to the entrances and attempt at the turn. Modify the existing blocks and add in new ones to navigate the two linkbots around the roundabout to reach their destinations (Robot1 goes from red to green entrance. Robot2 goes from orange to blue.)


		
Rubbish bin
Time