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

Piano
Linkbot Image Mindstorm Image Cursor Image
0x121110987654321y654321-1-2-3-4-5-6
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: (0 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: (3 in, 0 in)
Current Angle: 90 deg
Wheel Radius:
Track Width:
in

Robot 3

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

Robot 4

Linkbot
Mindstorm
Initial Position:
( in, in)
Initial Angle:
deg
Current Position: (9 in, 0 in)
Current Angle: 90 deg
Wheel Radius:
Track Width:
in
Catch a Football and Run Using 2 Movement Blocks
/* Code generated by RoboBlockly v2.5 */
/* Problem Statement: 
    Using the movement blocks, firstly move the robot to the
    ball, then move it to the blue line. In order to get this
    right, the red trace line must go from 0 to the football,
    and the blue trace line must go from the football to the
    blue line. (Click on "New Problem" to try another problem)
    */
#include <robot.h>
#include <chplot.h>
CLinkbotI robot1;
CPlot plot;
double radius1 = 1.75;

// Describe this function...
void Change_the_number_below_to_catch_the_ball() {
  robot1.setSpeed(2, radius1);
}

// Describe this function...
void Change_the_number_below_to_run_to_the_line() {
  double x;
  double y;
  robot1.getxy(x, y);
  if (/) {
    plot.noStrokeColor();
    plot.fillColor(rgb2hex(27, 153, 72));
    plot.rectangle(x - 0.8, -1, 1.6, 2);
    plot.strokeWidth(2);
    plot.strokeColor("white");
    plot.line(x, -1, x, 1);
    //
    robot1.setSpeed(3, radius1);
    robot1.traceColor("blue", 4);
  }
}

Change_the_number_below_to_catch_the_ball();
robot1.driveDistance(7, radius1);
Change_the_number_below_to_run_to_the_line();
robot1.driveDistance(3, radius1);

plot.label(PLOT_AXIS_XY, "");
plot.grid(PLOT_OFF);
plot.tics(PLOT_AXIS_XY, PLOT_OFF);
plot.axis(PLOT_AXIS_XY, PLOT_OFF);
plot.axisRange(PLOT_AXIS_X, 0, 12);
plot.axisRange(PLOT_AXIS_Y, -6, 6);
plot.ticsRange(PLOT_AXIS_XY, 1);
plot.sizeRatio(1);
plot.plotting();
Load Blocks
Hardware
LArduino
Workspace Show Ch Save File
Problem Statement:

Using the movement blocks, firstly move the robot to the ball, then move it to the blue line. In order to get this right, the red trace line must go from 0 to the football, and the blue trace line must go from the football to the blue line. (Click on "New Problem" to try another problem)


		
Rubbish bin
Time