Changeset dbfae54 in pyramid
- Timestamp:
- 10/16/13 20:11:36 (7 years ago)
- Branches:
- master
- Children:
- f5452ab
- Parents:
- 77a80d3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
firmware/Puzzlebox_Pyramid/Puzzlebox_Pyramid.ino
r77a80d3 rdbfae54 79 79 80 80 // Android ADK 81 AndroidAccessory acc( 82 "puzzlebox", 83 "PuzzleboxPyramid", 84 "Puzzlebox Pyramid", 85 "1.2", 86 "http://pyramid.puzzlebox.info", 87 "0000000000000000" 88 ); 89 81 90 // AndroidAccessory acc( 82 91 // "puzzlebox", 83 // " PuzzleboxPyramid",84 // " Puzzlebox Pyramid",85 // "1. 2",86 // "http:// pyramid.puzzlebox.info",92 // "TriggerRemote", 93 // "DemoKit Arduino Board", 94 // "1.0", 95 // "http://www.android.com", 87 96 // "0000000012345678" 88 97 // ); 89 90 AndroidAccessory acc(91 "puzzlebox",92 "TriggerRemote",93 "DemoKit Arduino Board",94 "1.0",95 "http://www.android.com",96 "0000000012345678"97 );98 98 99 99 byte msg[2]; … … 158 158 159 159 // Android ADK 160 //delay(500);161 //acc.powerOn();160 delay(500); 161 acc.powerOn(); 162 162 163 163 … … 182 182 183 183 184 //if (acc.isConnected()) {185 //modeADK = true;186 //Serial.println("INFO: ADK connection detected, setting modeADK");187 //setColorWheel(255, 0, 0); // red188 //}184 if (acc.isConnected()) { 185 modeADK = true; 186 Serial.println("INFO: ADK connection detected, setting modeADK"); 187 setColorWheel(255, 0, 0); // red 188 } 189 189 190 190 … … 216 216 void loop() { 217 217 218 if (modeBluetooth) 219 parseBluetooth(); 218 // if (acc.isConnected()) { 219 // modeADK = true; 220 // Serial1.end(); 221 // Serial.println("INFO: [LOOP] ADK connection detected, setting modeADK"); 222 // setColorWheel(255, 0, 0); // red 223 // } 224 225 // if (modeADK) 226 if (acc.isConnected()) 227 parseADK(); 220 228 221 229 else if (modeSerial) 222 230 parseSerialInput(); 231 232 else if (modeBluetooth) 233 parseBluetooth(); 223 234 224 235 // else if (modeADK) … … 273 284 // Determine method for Pyramid control 274 285 275 while ( (! Serial.available()) & (! Serial1.available()) ); 276 277 if (Serial.available()) { 278 modeSerial = true; 279 Serial.println("INFO: Serial input command received, setting modeSerial"); 280 } 281 282 else if (Serial1.available()) { 283 modeBluetooth = true; 284 setColorWheel(0,0,255); // Blue 285 Serial.println("INFO: Bluetooth input received, setting modeBluetooth"); 286 } 287 288 289 // while ( (! Serial.available()) & (! Serial1.available()) & (! acc.isConnected()) ); 286 // while ( (! Serial.available()) & (! Serial1.available()) ); 290 287 // 291 // if (Serial.available()) { 292 // modeSerial = true; 293 // Serial.println("INFO: Serial input command received, setting modeSerial"); 294 // } 295 // 296 // else if (acc.isConnected()) { 297 // modeADK = true; 298 // Serial1.end(); 299 // Serial.println("INFO: ADK connection detected, setting modeADK"); 300 // setColorWheel(255, 0, 0); // red 301 // } 302 // 303 // else if (Serial1.available()) { 304 // modeBluetooth = true; 305 // Serial.println("INFO: Bluetooth input received, setting modeBluetooth"); 306 // } 288 // if (Serial.available()) { 289 // modeSerial = true; 290 // Serial.println("INFO: Serial input command received, setting modeSerial"); 291 // } 292 // 293 // else if (Serial1.available()) { 294 // modeBluetooth = true; 295 // setColorWheel(0,0,255); // Blue 296 // Serial.println("INFO: Bluetooth input received, setting modeBluetooth"); 297 // } 298 299 300 while ( (! Serial.available()) & (! Serial1.available()) & (! acc.isConnected()) ); 301 302 if (Serial.available()) { 303 modeSerial = true; 304 Serial.println("INFO: Serial input command received, setting modeSerial"); 305 } 306 307 else if (acc.isConnected()) { 308 modeADK = true; 309 Serial1.end(); 310 Serial.println("INFO: ADK connection detected, setting modeADK"); 311 setColorWheel(255, 0, 0); // red 312 } 313 314 else if (Serial1.available()) { 315 modeBluetooth = true; 316 Serial.println("INFO: Bluetooth input received, setting modeBluetooth"); 317 } 307 318 308 319 … … 1146 1157 1147 1158 if (! modeADK) { 1148 Serial.println("INFO: ADK connection detected, setting modeADK");1149 1159 modeADK = true; 1160 Serial1.end(); 1161 Serial.println("INFO: parseADK connection detected, setting modeADK"); 1162 setColorWheel(255, 0, 0); // red 1150 1163 } 1151 1164 … … 1288 1301 1289 1302 1303 1304 1305 1306 1307 1308 1309 1310
Note: See TracChangeset
for help on using the changeset viewer.