Thomas Cauwelier / Mbed 2 deprecated visible_light_communication

Dependencies:   SoftSerial SDFileSystem mbed wave_player

Revision:
18:3aeaa22b265d
Parent:
17:8683abdc1912
Child:
21:2a91babf5a6d
--- a/main.cpp	Wed May 10 17:31:22 2017 +0200
+++ b/main.cpp	Wed May 10 15:54:29 2017 +0000
@@ -89,14 +89,15 @@
     //s.format(16, SoftSerial::None, 1);
     int i = 0;
     while (true){
-        wait(0.1);
-        for (int j = 0; j < 50; ++j) {
+        wait(0.005);
+        for (int j = 0; j < 1; ++j) {
             while(!s.writeable());
             //printf("put %i\r\n", 0b0101010100110011);
             //s.putc(0b0101010100110011);
             printf("put %i\r\n", i);
             //s.putc(0b0000000000000000);
-            s.putc(0b0000000000001111);
+            //s.putc(0b0000000000001111);
+            s.putc(i);
             i++;
         }
     }