asdf

Dependencies:   NokiaLCD XMIT_IR mbed

Fork of 4180_mP_WirelessPong_revC by Curtis Mulady

Revision:
20:a74fe4d43ec0
Parent:
19:5a4be4519de5
--- a/main.cpp	Sat Oct 06 17:45:32 2012 +0000
+++ b/main.cpp	Tue Oct 09 23:28:34 2012 +0000
@@ -2,6 +2,7 @@
 #include "rtos.h"
 #include "NokiaLCD.h"
 #include "XMIT_IR.h"
+#include "pong.h"
 
 #define FPS 15
 #define PKT_RATE 15
@@ -20,19 +21,19 @@
 ****************************************/
 
 //Function Prototypes
-void BlinkAlive(void const* arguments);
+/*void BlinkAlive(void const* arguments);
 void UpdateLCD(void const* arguments);
 void IRStuff(void const* arguments);
 void ISR_UARTRX(void);
 char CheckPacket(char new_data, char* packet_buffer, char* data, int data_len);
 void MakePacket2(char* data,int len);
-
-//Pin Setup
+*/
+/*//Pin Setup
 PwmOut led1(LED1);
 PwmOut led2(LED2);
 DigitalOut led3(LED3);
 DigitalOut led4(LED4);
-NokiaLCD lcd(p5, p7, p8, p9, NokiaLCD::LCD6610); // mosi, sclk, cs, rst, type
+//NokiaLCD lcd(p5, p7, p8, p9, NokiaLCD::LCD6610); // mosi, sclk, cs, rst, type
 Serial* devicerx;
 
 //Serial devicetx(p13,NC);
@@ -50,15 +51,32 @@
 Thread* threadptr_irstuff;
 char packet_buff[10];
 Mutex data_update_mutex;
-
+*/
 
-
+AnalogIn paddle(p20);
 
 int main()
 {
-
+    double left = 1.00, right = 0.8;
+    right = paddle;
+    pong pongTest;
+    pongTest.drawObjects();
+    while(1)
+    {
+    pongTest.clear();
+    right = paddle;
+    pongTest.update(left, right);
+    pongTest.drawObjects();
+    /*lcd.cls();
+    lcd.locate(0,1);
+    lcd.printf("%d", counter);
+    */
+    Thread::wait(1000/FPS);
+    }
+}
+/*
     //LCD init
-    lcd.background(0x000000);
+    //lcd.background(0x000000);
 
     //PC serial init
     pc.baud(19200);
@@ -78,8 +96,8 @@
     threadptr_irstuff = &thread_irstuff;
 
 
-
-    while(1) {
+*/
+   /* while(1) {
 
         //Use main loop to set LCD framerate
         thread_updatelcd.signal_set(0x1);
@@ -197,4 +215,4 @@
 }
 
 
-
+*/