Wii Nunchuk via RFM69HW to Duplo 9203 Remote Control Car Kit using ARM mbed on a FRDM-KL25Z
Dependencies: CRC FastPWM RFM69 USBDevice WakeUp WiiChuk_compat mbed-rtos mbed tlc59108
Fork of wiiNunchuk_compat by
Diff: main.cpp
- Revision:
- 9:dc6ffa2ef179
- Parent:
- 8:5f933580b560
- Child:
- 10:ba778fc959b8
--- a/main.cpp Sun Jun 26 18:31:28 2016 +0000 +++ b/main.cpp Sun Jun 26 18:31:45 2016 +0000 @@ -126,10 +126,11 @@ while(1) { //if (!central) for(int x = 0; x < 5; x++) { - //pc.printf(central? "stop\r\n" : "direction %s\r\n", directions[direction]); - if (central && stops_sent++ < 50) - BB(); - else { + //pc.printf(central? "stop %s %d\r\n" : "direction %s %d\r\n", directions[direction], stops_sent); + if (central) { + if (stops_sent++ < 50) + BB(); + } else { stops_sent = 0; switch(direction) { case 0: XR(); break;