GroupA / Mbed 2 deprecated Lab_6_WaG

Dependencies:   mbed

Fork of WaG by GroupA

Revision:
32:0dc2b4a3eee6
Parent:
23:3da1d39c1ae9
Child:
39:abf211b17e3c
--- a/display.cpp	Thu Mar 22 15:42:51 2018 +0000
+++ b/display.cpp	Thu Mar 22 16:06:21 2018 +0000
@@ -157,12 +157,14 @@
 */
 void test_target_leds() {
     int pressed = uti_chk_ubutton();
+    int led_command = 0;
     while (pressed == 0);
     while (pressed == 0) {
-        for (int i = 1; i <= 8; i++) {
-            //light up LED[i]
+        for (int i = 0x1; i <= 0x8; i++) {
+            led_command = 0x0500 + i;
+            spi_send(as1107, led_command); //light up LED[i]
             wait(0.1);
-            //turn off LED[i]
+            spi_send(as1107, 0x0500); //turn off LED[i]
         }
     }
 }
\ No newline at end of file