Benny Gómez
/
Serial_Shit_MASTER
jajajja
Revision 0:2829e7973b41, committed 2017-06-03
- Comitter:
- sick010203
- Date:
- Sat Jun 03 17:50:12 2017 +0000
- Commit message:
- Hola SerialMaestro
Changed in this revision
diff -r 000000000000 -r 2829e7973b41 SoftSerial.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SoftSerial.lib Sat Jun 03 17:50:12 2017 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/users/Sissors/code/SoftSerial/#a0029614de72
diff -r 000000000000 -r 2829e7973b41 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sat Jun 03 17:50:12 2017 +0000 @@ -0,0 +1,31 @@ +#include "mbed.h" +#include "SoftSerial.h" +#include <string> +SoftSerial micro(D2,D3); +Serial pc (USBTX, USBRX); +DigitalOut bad(LED2); + + +int main () { +micro.baud(9600); +pc.baud(9600); + +string readString; +char message [125]; + +while(1){ + while (micro.writeable()) + { + bad=!bad; + wait(0.05); + pc.gets(message,5); + readString += message; + pc.printf("%s\r\n", readString); + wait(0.03); + micro.printf("%s\r\n", readString); + break; + + } + readString=""; + } + } \ No newline at end of file
diff -r 000000000000 -r 2829e7973b41 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sat Jun 03 17:50:12 2017 +0000 @@ -0,0 +1,1 @@ +https://mbed.org/users/mbed_official/code/mbed/builds/4eea097334d6 \ No newline at end of file