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

Piano
Linkbot Image Mindstorm 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

0
S
M
L
Initial Position:
( in, in)
Initial Angle:
deg
Current Position: (0 in, 0 in)
Current Angle: 0 deg
Wheel Radius:
Track Width:
in

Robot 2

0
S
M
L
Initial Position:
( in, in)
Initial Angle:
deg
Current Position: (3 in, 0 in)
Current Angle: 90 deg
Wheel Radius:
Track Width:
in

Robot 3

0
S
M
L
Initial Position:
( in, in)
Initial Angle:
deg
Current Position: (6 in, 0 in)
Current Angle: 90 deg
Wheel Radius:
Track Width:
in

Robot 4

0
S
M
L
Initial Position:
( in, in)
Initial Angle:
deg
Current Position: (9 in, 0 in)
Current Angle: 90 deg
Wheel Radius:
Track Width:
in
Catch the Ball and Score a Touchdown!
/* Code generated by RoboBlockly v2.5 */
#include <robot.h>
#include <chplot.h>
CLinkbotI robot1;
CPlot plot;
double radius1 = 1.75;

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

// Describe this function...
void Change_Value_Below_to_Score_a_Touchdown_() {
  double x;
  double y;
  robot1.getxy(x, y);
  if (/) {
    plot.noStrokeColor();
    plot.fillColor(rgb2hex(72, 154, 73));
    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);
  }
}

// Describe this function...
void Touchdown_() {
  double x2;
  double y2;
  robot1.getxy(x2, y2);
  if (/ && x2 == 10) {
    plot.strokeColor("white");
    plot.strokeWidth(6);
    plot.text("Touchdown!", PLOT_TEXT_LEFT, 2.3, 4.5);
    plot.strokeColor("orange");
    plot.fillColor("#ffff33");
    plot.star(1.2, 5.1, 1.2, 0);
    plot.star(10.5, 5.1, 1.2, 0);
  }
}

Change_Value_Below_to_Catch_the_Ball_();
robot1.driveDistance(6, radius1);
Change_Value_Below_to_Score_a_Touchdown_();
robot1.driveDistance(4, radius1);
Touchdown_();

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:

Change the values of the pre-placed blocks to move the robot to get the football and then score a touchdown. Click on "New Problem" to try another problem!

 


		
Rubbish bin
Time