Author: Matthew Capron
This program initializes a drive cube at a certain speed. After a certain amount of time the drive cube will change behavior while affecting other cubes within the robot.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | void my_function();
void setup()
{
set_drive(200);//starts drive cube at speed of 200
set_timeout(4200, my_function);//after 4.2 seconds it enters my_function
}
void loop()
{
}
void my_function()
{
set_drive(1);//stops drive from moving
set_block_value(12945, 255);//sets flashlight 12945 to full
//set_block_value(15603, 255);
set_block_value(3772, 200);//sets flashling flashlightto begin flashing
set_block_value(9344, 200);//sets distance cube to 200
}
|