Curtis Mulady
/
4180_mP_WirelessPong_revA
miniProject-Wireless Pong
Diff: main.cpp
- Revision:
- 5:2e08cc167fff
- Parent:
- 4:8fdff78c13c8
- Child:
- 6:5563f0026858
--- a/main.cpp Thu Oct 04 15:12:58 2012 +0000 +++ b/main.cpp Thu Oct 04 18:33:25 2012 +0000 @@ -22,9 +22,8 @@ DigitalOut led3(LED3); DigitalOut led4(LED4); NokiaLCD lcd(p5, p7, p8, p9, NokiaLCD::LCD6610); // mosi, sclk, cs, rst, type -Serial device(p28, p27); // tx, rx -PwmOut IRLED_mod(p22); -DigitalIn IRLED_rx(p20); +Serial device(p13, p14); // tx, rx +PwmOut IRLED_mod(p21); //Global Vars char buffer[32]; @@ -92,11 +91,10 @@ void IRStuff(void const* arguments) { while(true) { - device.putc(irdata_out); if(device.readable()) { irdata_in = device.getc(); } - Thread::wait(300); + Thread::wait(10); } } @@ -106,6 +104,7 @@ while(true) { led1 = !led1; irdata_out++; + device.putc(irdata_out); Thread::wait(1000); } } \ No newline at end of file