comparison sea/sea.ino @ 1:6f1cd84f8e23

Remove debugging from sea unit
author Daniel O'Connor <darius@dons.net.au>
date Sat, 11 Jul 2015 15:20:40 +0930
parents fe0a2f223e10
children
comparison
equal deleted inserted replaced
0:fe0a2f223e10 1:6f1cd84f8e23
39 } 39 }
40 40
41 void loop() { 41 void loop() {
42 int tmp; 42 int tmp;
43 43
44 Serial.println("Parsing L...");
45 tmp = parseIn('L'); 44 tmp = parseIn('L');
46 if (tmp > 0) 45 if (tmp > 0)
47 leftMotor->run(FORWARD); 46 leftMotor->run(FORWARD);
48 else 47 else
49 leftMotor->run(BACKWARD); 48 leftMotor->run(BACKWARD);
50 leftMotor->setSpeed(abs(tmp)); 49 leftMotor->setSpeed(abs(tmp));
51 50
52 Serial.println("Parsing R...");
53 tmp = parseIn('R'); 51 tmp = parseIn('R');
54 if (tmp > 0) 52 if (tmp > 0)
55 rightMotor->run(FORWARD); 53 rightMotor->run(FORWARD);
56 else 54 else
57 rightMotor->run(BACKWARD); 55 rightMotor->run(BACKWARD);
58 rightMotor->setSpeed(abs(tmp)); 56 rightMotor->setSpeed(abs(tmp));
59 57
60 Serial.println("Parsing V...");
61 tmp = parseIn('V'); 58 tmp = parseIn('V');
62 if (tmp > 0) 59 if (tmp > 0)
63 vertMotor->run(FORWARD); 60 vertMotor->run(FORWARD);
64 else 61 else
65 vertMotor->run(BACKWARD); 62 vertMotor->run(BACKWARD);
66 vertMotor->setSpeed(abs(tmp)); 63 vertMotor->setSpeed(abs(tmp));
67
68 Serial.println("Done");
69 } 64 }
70 65
71 /* 66 /*
72 * Local variables: 67 * Local variables:
73 * mode: c++ 68 * mode: c++