tinyBotWave
tinyBotWave
tinyBotWave is a great first program. This example waves tinyBot's channel three servo up and down.
Commands used:
robotMove(<channel>,<position>)
What We Learn:
This program uses only one command, robotMove. Notice the structure of the program. Where do your commands go? What makes them run repeatedly? After you've seen the program work, can you re-create it by adding commands to a new mimicBlock or Arduino file?
Instructions:
Download the program images HERE or click the images below. The file includes both the mimicBlock and Arduino versions of the tinyBotWave program. Copy the program using your computer, then upload it onto tinyBot. Does your robot move like the robot in the GIF at the top of the page?
Download Files:
Don't feel like copying the files? Download the complete program here.
Download tinyBotWave.ino for Arduino
Download robotWave.abp for mimicBlock
Cut and paste code:
#include <robot.h>
void setup() {
// put your setup code here, to run once:
robotActivate();
}
void loop() {
// put your main code here, to run repeatedly:
robotMove(3,170);
robotMove(3,80);
}