Second revision of test code for Polyathalon sensor board.

Dependencies:   mbed MODDMA

Files at this revision

API Documentation at this revision

Comitter:
mpanetta
Date:
Sat Nov 05 21:10:10 2011 +0000
Parent:
0:13a7de7ce046
Commit message:

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Sat Nov 05 18:29:39 2011 +0000
+++ b/main.cpp	Sat Nov 05 21:10:10 2011 +0000
@@ -36,20 +36,22 @@
         if (leds == 0x80)
             leds = 0x01;
         tlc5916.write_reg(leds);
-        leds = leds << 1;
+               
         tlc5916.enable();
         wait_us(25);
         led1 = 1;
         val1 = in4.read_u16();
-        val2 = in5.read_u16();
+        //val2 = in5.read_u16();
         led1 = 0;
         tlc5916.disable();
+        wait(1);
         led2 = 1;
         base.locate(0, 0);
         base.printf("AIN:%4.4x", val1);
         base.locate(0, 1);
         base.printf("AIN:%4.4x", leds);
         led2 = 0;
+        leds = leds << 1;
     }
         
 #if 0