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

CSP Unit 3 Lesson 8.9

Piano
Linkbot Image Mindstorm Image
0x36302418126y36302418126
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: 90 deg
Wheel Radius:
Track Width:
in

Robot 2

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 3

0
S
M
L
Initial Position:
( in, in)
Initial Angle:
deg
Current Position: (12 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: (18 in, 0 in)
Current Angle: 90 deg
Wheel Radius:
Track Width:
in
CSP Unit 3 Lesson 8.9
/* Code generated by RoboBlockly v2.5 */
/* Problem Statement: 
    Some of the code from Lesson 8.6 has been pre-placed in the
    Workspace, along with a sample comment. Add a few more
    comments as appropriate.
    */
#include <robot.h>
CLinkbotI robot;
double radius = 1.75;
double trackwidth = 3.69;

// Describe this function...
void traceTriangle(double x, double y, double sideLength) {
  // Drive robot to left corner of triangle ith trace off
  robot.traceOff();
  robot.drivexyTo(x, y, radius, trackwidth);
  // Draw bottom side of triangle
  robot.traceOn();
  robot.drivexyTo(x + sideLength, y, radius, trackwidth);
  // Draw other two sides of triangle
  // (Code for that goes here)
}

// Program to draw two triangles
// Set robot speed and trace color
robot.setSpeed(6, radius);
robot.traceColor("red", 4);
// Have robot trace first triangle
traceTriangle(8, 8, 10);
// Function call for second triangle goes here
Load Blocks
Hardware
LArduino
Workspace Show Ch Save File
Problem Statement:

Some of the code from Lesson 8.6 has been pre-placed in the Workspace, along with a few sample comments. Add a few more comments as appropriate.


		
Rubbish bin
Time