Learning Math and Coding with Robots

0x126-6-12y126-6-12
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
Axes: x-axis y-axis Show Grid
Grid: 24x24 inches 36x36 inches 72x72 inches
96x96 inches 192x192 inches
Quad: 4 quadrants 1 quadrant
Units: US Customary Metric
Background:

Robot 1

Initial Position:
( in, in)
Initial Angle:
deg
Current Position: (0 in, 0 in)
Current Angle: 00 deg
Wheel Radius:
Track Width:
in

Robot 2

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

Robot 3

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

Robot 4

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

Turkey Tail
Problem Statement:

You're making a turkey poster for Thanksgiving, but the turkey's tail is incomplete. Use the robot to draw in the lines sectioning the tails by programming the grid location (x,y) where the robot should begin/stop drawing. Make sure the robot doesn't draw the lines on the rest of the turkey
/* Code generated by RoboBlockly v2.0 */
/* Problem Statement: 
    You're making a turkey poster for Thanksgiving, but the
    turkey's tail is incomplete. use the robot to draw in the
    lines sectioning the tails. Make sure the robot doesn't
    draw the lines on the rest of the turkey*/
#include <linkbot.h>
double angle;
double xi;
double yi;
double xo;
double yo;
CLinkbotI robot;
double radius = 1.75;
double trackwidth = 3.69;
int count;
int count2;
int count3;

robot.traceColor("#330000", 2);
robot.setSpeed(30, radius);
angle = 0;
xi = 4 * cos(deg2rad(angle));
yi = 4 * sin(deg2rad(angle));
xo = 9.5 * cos(deg2rad(angle));
yo = 9.5 * sin(deg2rad(angle));
count = 0;
while(count < 4) {
  robot.traceOff();
  robot.drivexyTo(xi, yi, radius, trackwidth);
  robot.traceOn();
  robot.drivexyTo(xo, yo, radius, trackwidth);
  robot.traceOff();
  robot.drivexyTo(xi, yi, radius, trackwidth);
  angle = angle + 20;
  xi = 4 * cos(deg2rad(angle));
  yi = 4 * sin(deg2rad(angle));
  xo = 9.5 * cos(deg2rad(angle));
  yo = 9.5 * sin(deg2rad(angle));
  count = count + 1;
}
count2 = 0;
while(count2 < 2) {
  xi = 7.5 * cos(deg2rad(angle));
  yi = 7.5 * sin(deg2rad(angle));
  xo = 9.5 * cos(deg2rad(angle));
  yo = 9.5 * sin(deg2rad(angle));
  angle = angle + 20;
  robot.traceOff();
  robot.drivexyTo(xi, yi, radius, trackwidth);
  robot.traceOn();
  robot.drivexyTo(xo, yo, radius, trackwidth);
  robot.traceOff();
  robot.drivexyTo(xi, yi, radius, trackwidth);
  count2 = count2 + 1;
}
count3 = 0;
while(count3 < 4) {
  xi = 4 * cos(deg2rad(angle));
  yi = 4 * sin(deg2rad(angle));
  xo = 9.5 * cos(deg2rad(angle));
  yo = 9.5 * sin(deg2rad(angle));
  angle = angle + 20;
  robot.traceOff();
  robot.drivexyTo(xi, yi, radius, trackwidth);
  robot.traceOn();
  robot.drivexyTo(xo, yo, radius, trackwidth);
  robot.traceOff();
  robot.drivexyTo(xi, yi, radius, trackwidth);
  count3 = count3 + 1;
}
/* Code generated by RoboBlockly v2.0 */
/* Problem Statement: 
    You're making a turkey poster for Thanksgiving, but the
    turkey's tail is incomplete. use the robot to draw in the
    lines sectioning the tails. Make sure the robot doesn't
    draw the lines on the rest of the turkey*/
#include <linkbot.h>
CLinkbotI robot;
double radius = 1.75;
double trackwidth = 3.69;
int count;
int count2;
int count3;

robot.traceColor("#330000", 2);
robot.setSpeed(30, radius);
count = 0;
while(count < 4) {
  robot.traceOff();
  robot.driveDistance(4, radius);
  robot.traceOn();
  robot.driveDistance(5.5, radius);
  robot.traceOff();
  robot.driveDistance(-9.5, radius);
  robot.turnLeft(20, radius, trackwidth);
  count = count + 1;
}
count2 = 0;
while(count2 < 2) {
  robot.traceOff();
  robot.driveDistance(7.5, radius);
  robot.traceOn();
  robot.driveDistance(2, radius);
  robot.traceOff();
  robot.driveDistance(-9.5, radius);
  robot.turnLeft(20, radius, trackwidth);
  count2 = count2 + 1;
}
count3 = 0;
while(count3 < 4) {
  robot.traceOff();
  robot.driveDistance(4, radius);
  robot.traceOn();
  robot.driveDistance(5.5, radius);
  robot.traceOff();
  robot.driveDistance(-9.5, radius);
  robot.turnLeft(20, radius, trackwidth);
  count3 = count3 + 1;
}
Blocks Save Blocks Load Blocks Show Ch Save Ch Workspace
Problem Statement:

You're making a turkey poster for Thanksgiving, but the turkey's tail is incomplete. Use the robot to draw in the lines sectioning the tails by programming the grid location (x,y) where the robot should begin/stop drawing. Make sure the robot doesn't draw the lines on the rest of the turkey

		
Time