Skip to content

Instantly share code, notes, and snippets.

@mithi
Last active Aug 29, 2015
Embed
What would you like to do?
writeM wheelTest for arcbotics Sparki
#include <Sparki.h>
void beepx(int x, int d){
for (int i = 0; i < x; i++){
delay(d);
sparki.beep();
}
}
void writeM(int s){
sparki.moveForward(6*s);
sparki.moveRight(90);
sparki.moveForward(1*s);
sparki.moveRight(45);
sparki.moveForward(2.5*s);
sparki.moveLeft(90);
sparki.moveForward(2.5*s);
sparki.moveRight(45);
sparki.moveForward(1*s);
sparki.moveRight(90);
sparki.moveForward(6*s);
sparki.moveRight(90);
sparki.moveForward(1*s);
sparki.moveRight(90);
sparki.moveForward(4*s);
sparki.moveLeft(135);
sparki.moveForward(2.5*s);
sparki.moveRight(90);
sparki.moveForward(2.5*s);
sparki.moveLeft(135);
sparki.moveForward(4*s);
sparki.moveRight(90);
sparki.moveForward(1*s);
}
void wheelTest(){
beepx(3, 200);
writeM(1);
beepx(3, 200);
}
void setup(){
wheelTest();
}
void loop(){
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment