Author: Matthew Capron
This program starts a flashlight cube into a flashing pattern when a certain value is received by the flashlight cube.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | void setup()
{
}
void loop()
{
if (set_BlockValue == 200)//waits for Drive cube to set this flashlight block to 200
{set_flashlight(255);//when set to 255 turns flashlight up to 255 for .25 seconds
wait(250);
set_flashlight(150);//sets flashlight to 150 for .25 seconds, then repeats
wait(250);
}
}
|