Changeset 8c73fb4 in orbit
- Timestamp:
- 11/15/12 16:29:56 (7 years ago)
- Branches:
- master, RawEEG, Raw_EEG_Plot, Servo, Tab_Interface, pyramid
- Children:
- f460326
- Parents:
- 08d64cc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arduino/puzzlebox_orbit_Uno_V3/puzzlebox_orbit_Uno_V3.ino
r08d64cc r8c73fb4 107 107 } 108 108 109 void setThrottle() {110 111 char inByte=0;112 int a=0;113 int b=0;114 int c=0;115 int newThrottle=0;116 117 while (Serial.available() == 0);118 inByte = Serial.read() - '0';119 //Serial.println(inByte);120 a = inByte;121 122 while (Serial.available() == 0);123 inByte = Serial.read() - '0';124 //Serial.println(inByte);125 b = inByte;126 127 while (Serial.available() == 0);128 inByte = Serial.read() - '0';129 //Serial.println(inByte);130 c = inByte;131 132 newThrottle = (a * 100) + (b * 10) + c;133 134 if (newThrottle < 0)135 newThrottle=0;136 137 if (newThrottle > 100)138 newThrottle=100;139 140 _throttle=newThrottle;141 142 Serial.print("_throttle=");143 Serial.println(int(_throttle));144 145 }146 147 109 void loop() 148 110 {int i; … … 160 122 case 'F': _pitch+=5; Serial.print("_pitch="); Serial.println(int(_pitch)); break; 161 123 case 'B': _pitch-=5; Serial.print("_pitch="); Serial.println(int(_pitch)); break; 162 <<<<<<< HEAD163 124 case '1': _channel='A'; Serial.println("_channel=A"); break; 164 125 case '2': _channel='B'; Serial.println("_channel=B"); break; 165 126 case '3': _channel='C'; Serial.println("_channel=C"); break; 166 =======167 case '1': _channel='A'; Serial.print("_channel=A"); break;168 case '2': _channel='B'; Serial.print("_throttle=B"); break;169 case '3': _channel='C'; Serial.print("_throttle=C"); break;170 case 'x': setThrottle(); break;171 >>>>>>> 4af2eca0d67b030ccd9d3fa1d0caa07e6c6aa26e172 127 } 173 128 }
Note: See TracChangeset
for help on using the changeset viewer.