alexandra rodriguez
/
CHATGUIA7
chat comunicación doble
Revision 0:bfe2c8df46ff, committed 2017-09-28
- Comitter:
- YARodriguez
- Date:
- Thu Sep 28 00:37:11 2017 +0000
- Commit message:
- Chat_Comunicaci?n
Changed in this revision
diff -r 000000000000 -r bfe2c8df46ff SoftSerial.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SoftSerial.lib Thu Sep 28 00:37:11 2017 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/users/Sissors/code/SoftSerial/#a0029614de72
diff -r 000000000000 -r bfe2c8df46ff main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Sep 28 00:37:11 2017 +0000 @@ -0,0 +1,33 @@ +#include "mbed.h" +#include "SoftSerial.h" + +SoftSerial MB(D2,D3); +Serial PC(USBTX,USBRX); +char rec; +char send; +int main() +{ + + while(1) + { + + // for (int i=0;i<18;i++) + //{ + //PC.printf("%d \n\r",i); + //wait(0.5); + //} + if(PC.readable()>0) + { + send=PC.getc(); + MB.printf("%c",send); + PC.printf("%c",send); + wait(0.3); + } + if(MB.readable()>0) + { + rec=MB.getc(); + PC.printf("%c",rec); + wait (0.3); + } + } +}
diff -r 000000000000 -r bfe2c8df46ff mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Sep 28 00:37:11 2017 +0000 @@ -0,0 +1,1 @@ +https://mbed.org/users/mbed_official/code/mbed/builds/675da3299148 \ No newline at end of file