Advertisement
Guest User

Arduino Code

a guest
Jul 15th, 2013
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. void setup() //Initial setups, these are called once on startup only
  2. {
  3. pinMode(0, OUTPUT); // set pin 50 to output
  4. pinMode(1, OUTPUT); // set pin 51 to output
  5. pinMode(2, OUTPUT); // set pin 52 to output
  6. pinMode(3, OUTPUT); // set pin 53 to output
  7. stepperL.setSpeed(30); //Set speed of steppers at 60 RPM
  8. stepperR.setSpeed(30); //"
  9. Serial.begin(19200); //Start serial connection to PC
  10. Serial1.begin(19200); //Start listening to Electric Imp
  11. Serial.println("Platform ready."); //Message that platform is ready for commands
  12. Serial1.print("Platform ready."); //Message to Imp
  13. }
  14.  
  15. //LOOP//////////////////////////////////////////////////////////////////////////////////////////////////////
  16.  
  17. void loop()
  18. {
  19. if (Serial1.available()){ //When a command is received...
  20.  
  21. retrieveCommand(); //Retrieve values from received string
  22. forward(y);
  23. }
  24. Serial1.print("Hello World");
  25. Serial.println("Hello World");
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement