Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 8:0503a220c5f2, committed 2021-07-11
- Comitter:
- marumbo
- Date:
- Sun Jul 11 19:27:40 2021 +0000
- Parent:
- 7:ec8f01387c36
- Commit message:
- Lora timer start fix;
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sun Jul 11 19:07:47 2021 +0000 +++ b/main.cpp Sun Jul 11 19:27:40 2021 +0000 @@ -172,6 +172,7 @@ lcd.printf(lcdPrint.c_str()); // Write text into LCD buffer // Clear LCD } + void StartButtonTimer(){ printf("Button Timer start \n"); @@ -270,16 +271,21 @@ } void PrintContent(){ + Display(content[current_topic][1]); } void CheckDirection(){ + + pushButton.rise(callback(&StartButtonTimer)); pushButton.fall(callback(&StopButtonTimer)); - + + loraTimerStart = time(NULL); while(1) { - loraTimerStart = time(NULL); + + if(direction == 0) //O is a forward direction { redLed = 0; @@ -310,7 +316,9 @@ printf("Mode 1... \n"); printf("current topic %s \n", content[current_topic][0].c_str()); - + blueLed = 0; + redLed = 0; + flipper.attach(&BlinkWhiteLed, 1.0); pushButton.fall(callback(&Mode2));