Changeset f5d44ec in pyramid
- Timestamp:
- 10/15/13 20:54:39 (7 years ago)
- Branches:
- master
- Children:
- 77a80d3
- Parents:
- b62ab59
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
firmware/Puzzlebox_Pyramid/Puzzlebox_Pyramid.ino
rb62ab59 rf5d44ec 220 220 if (millis()-lastLoop>_IR_period) { 221 221 222 if (att_buff>_attention_threshold) { 223 224 // If detected Attention level is above the target threshold 225 // then send the control command to fly the helicopter. 226 // Otherwise send no control frames, which cause the helicopter 227 // to land. 228 229 _throttle=_throttle_hover; 230 231 } 232 // Add Settings for _yaw and _pitch here for custom flight path 233 234 sendCode(formCode(_throttle,_yaw,_pitch)); 235 236 if (modeBluetooth) 237 Serial1.flush(); 238 239 // } 222 // Add Settings for _yaw and _pitch here for custom flight path 223 224 sendCode(formCode(_throttle,_yaw,_pitch)); 225 226 if (modeBluetooth) 227 Serial1.flush(); 240 228 241 229 thisLoop = millis() - lastLoop; … … 253 241 } // if (millis()-lastLoop>_IR_period) 254 242 255 } // Main loop243 } // Main loop 256 244 257 245 … … 271 259 else if (Serial1.available()) { 272 260 modeBluetooth = true; 261 setColorWheel(0,0,255); // Blue 273 262 Serial.println("INFO: Bluetooth input received, setting modeBluetooth"); 274 263 } … … 401 390 402 391 403 404 } // end if(bigPacket) 392 if (att_buff>_attention_threshold) { 393 394 // If detected Attention level is above the target threshold 395 // then send the control command to fly the helicopter. 396 // Otherwise send no control frames, which cause the helicopter 397 // to land. 398 399 _throttle=_throttle_hover; 400 401 402 } else { 403 404 _throttle=0; 405 406 } 407 408 409 } // end if(bigPacket) 410 405 411 bigPacket = false; 412 406 413 } // if (checksum == generatedChecksum) 414 407 415 else { 408 416 #if DEBUG_OUTPUT … … 413 421 } // end if read 0xAA byte (170) 414 422 } // end if read 0xAA byte (170) 415 423 424 416 425 } // parseBluetooth 417 426 … … 437 446 void setupBlueToothConnection() { 438 447 439 setColorWheel(0,0,255); // Blue448 // setColorWheel(0,0,255); // Blue 440 449 441 450 Serial1.begin(38400); // Set Bluetooth Module BaudRate (for communicating to ADK) to default baud rate 38400 … … 1002 1011 1003 1012 1013
Note: See TracChangeset
for help on using the changeset viewer.