AguilaBoard program. No library.

Dependencies:   mbed-rtos mbed

Fork of PYL_v6 by Jonathan Moreno

Files at this revision

API Documentation at this revision

Comitter:
jmoreno10
Date:
Mon Oct 29 05:37:02 2018 +0000
Parent:
6:172a750bbf33
Commit message:
AguilaBoard code (no library)

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 172a750bbf33 -r a42095d457a0 main.cpp
--- a/main.cpp	Wed Oct 10 22:10:01 2018 +0000
+++ b/main.cpp	Mon Oct 29 05:37:02 2018 +0000
@@ -63,6 +63,7 @@
             // Slave writes to Master. Master reads.
             case I2CSlave::ReadAddressed: 
                 slave.write(msg, strlen(msg) + 1); // Includes null char
+                slave.stop();
                 printf("Writing to Master:\t<<- %s\n", msg);
                 break;
              
@@ -70,6 +71,7 @@
             // Master writes to Slave. Slave reads.
             case I2CSlave::WriteAddressed: 
                 slave.read(buf, 200); //Read up to 30 characters from Master
+                //slave.stop();
                 printf("\n\nReading from Master:\t->> %s\n", buf);
                 char j = buf[0];