queenWave
queenWave
A simple variation on robotWave, this program demonstrates what changing parameters in the same basic program can do. This example puts mimicArm in a starting position, waits one second, then goes to a second position. Experiment by changing the robotMove values and the delay values to see how it affects the robots actions.
Download queenWave.ino for Arduino
Download queenWave.abp for mimicBlock
Cut and paste code:
#include robot.h //Tell your arduino to go get the custom mimicArm code
void setup() {
// put your setup code here, to run once:
robotActivate(); //Tell the robot that Arduino will be sending it commands
}
void loop() {
// put your main code here, to run repeatedly:
robotMode(arduino); //Put the robot in Arduino command mode
robotMove(1,90); //Move to start point of wave
robotMove(2,95); //Put the robots 'shoulder' in a natural position
robotMove(3,200); //Put robot 'elbow' in natural wave position
delay(1000); //wait 1 second
robotMove(1,200); //put robot 'base' at other position of wave
delay(1000); //wait 1 second before starng over
}