NB
Dependencies: SoftSerial mbed TextLCD
Revision 2:38579897448f, committed 2017-03-15
- Comitter:
- dimmu8410
- Date:
- Wed Mar 15 00:16:44 2017 +0000
- Parent:
- 1:34f5a73ebf6c
- Commit message:
- jajajajajajaja
Changed in this revision
TextLCD.lib | Show annotated file Show diff for this revision Revisions of this file |
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 34f5a73ebf6c -r 38579897448f TextLCD.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TextLCD.lib Wed Mar 15 00:16:44 2017 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/users/simon/code/TextLCD/#308d188a2d3a
diff -r 34f5a73ebf6c -r 38579897448f main.cpp --- a/main.cpp Sat Mar 11 15:13:00 2017 +0000 +++ b/main.cpp Wed Mar 15 00:16:44 2017 +0000 @@ -1,17 +1,23 @@ +#include "TextLCD.h" #include "mbed.h" #include "SoftSerial.h" #include <string> int ledPin = 13; string readString; +int conta=0; +int ban=0; char c[125]; AnalogIn ai(A0); float measure; SoftSerial BT(D2,D3); Serial pc(USBTX,USBRX); DigitalOut led(LED2); - +TextLCD lcd(D4,D5,D6,D7,D8,D9); int main() { + lcd.locate(0,0); + wait(0.1); + lcd.locate(0,0); pc.baud(9600); BT.baud(9600); while(1) @@ -26,6 +32,23 @@ if (readString.length()>0) { pc.printf("%s",readString); + lcd.printf("%s",readString); + wait(0.05); + conta+=1; + if((ban==1)&&(conta>15)) + { + ban=0; + conta=0; + lcd.cls(); + lcd.locate(0,0); + } + if(conta>15) + { + lcd.locate(0,1); + conta=0; + ban=1; + } + //pc.printf("%s\r\n",readString); if (readString == "1") {