program for conv2

Dependencies:   mbed

Fork of I2C_HelloWorld_Mbed by mbed official

Revision:
7:04a1f5398882
Parent:
6:35640814d53b
--- a/main.cpp	Tue Dec 15 22:44:19 2015 +0000
+++ b/main.cpp	Wed Dec 16 19:42:52 2015 +0000
@@ -12,7 +12,7 @@
     if (conv2.getc() == DATA_TO_WRITE_CHAR){
         char received = conv2.getc();
         //conv2.putc(received);
-        if (received  == SLAVE_ADDR){  // writing to slave
+        if (received  == RTC_ADDR){  // writing to slave
             if (!transmission) {
                 i2c.start();
                 transmission = 1;
@@ -32,7 +32,7 @@
                 }
             }
         }
-        else if (received  == (SLAVE_ADDR | 0x01)){ // reading from slave
+        else if (received  == (RTC_ADDR | 0x01)){ // reading from slave
             char rec;
             if (!transmission) {
                 i2c.start();