slave3

Dependencies:   mbed

Fork of freeslave2_1 by Chaitanya Viswa

Files at this revision

API Documentation at this revision

Comitter:
raizel_varun
Date:
Mon Dec 08 03:55:57 2014 +0000
Parent:
0:24e80ff2c7b1
Commit message:
slave3

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 24e80ff2c7b1 -r 4c71a7675750 main.cpp
--- a/main.cpp	Sat Dec 06 06:24:28 2014 +0000
+++ b/main.cpp	Mon Dec 08 03:55:57 2014 +0000
@@ -7,23 +7,24 @@
 
 void main(){
     printf("press backspace for slave to start \n\r");
+    char *data_send = new char;
+            *data_send = 'k';
     while(1){
-        if(pc.getc()==8){
-            bool loopvariable1= true;
-            char *data_send = new char;
-            *data_send = 'k';
+        //if(pc.getc()==8){
+          //  bool loopvariable1= true;
+            
             slave.address(0x20);
             int slave_status=1;
-            while(loopvariable1){
+            //while(loopvariable1){
                 if(slave.receive()==1){
                 slave_status=slave.write(data_send,1);
                     if(!slave_status){
                         printf("1 wrote %c to master\n\r",*data_send);
-                        loopvariable1 = false;
+              //          loopvariable1 = false;
                     }
                 }
             }
             printf("2 done");
         }
-    }
-}                
\ No newline at end of file
+    
+                
\ No newline at end of file