First Final Version, Will probably need revision with regards to LCD and maybe the clock
Dependencies: mbed HTTPClient MMA8452Q mbed-rtos 4DGL-uLCD-SE NTPClient SDFileSystem1 EthernetInterface
Revision 5:c802be973546, committed 2020-12-19
- Comitter:
- stephenb
- Date:
- Sat Dec 19 11:08:16 2020 +0000
- Parent:
- 4:f8614fcfba5a
- Commit message:
- 1
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Dec 18 23:17:07 2020 +0000 +++ b/main.cpp Sat Dec 19 11:08:16 2020 +0000 @@ -152,7 +152,6 @@ uLCD.printf("CHECK CONTAINER"); } else if ((X<-0.9)||(X>0.9)||(Y<-0.9)||(Y>0.9)){ - soundalarm(); //Sounds alarm sdlog(2, Clock.read(), 0,0,0,0); //Records tipping to SD card with timestamp uLCD.textbackground_color(RED); uLCD.locate(0,5); // Move cursor @@ -161,7 +160,8 @@ uLCD.printf("CONTAINER INVERTED"); uLCD.locate(0,7); uLCD.textbackground_color(BLUE); - uLCD.printf("Press to clear"); + uLCD.printf("Press to clear"); + soundalarm(); //Sounds alarm } else{ uLCD.textbackground_color(BLACK); @@ -190,8 +190,8 @@ uLCD.locate(0,10); uLCD.textbackground_color(RED); uLCD.printf("CORRECTION NEEDED!"); + sdlog(1, Clock.read(), tempnotright,0,0,0); soundalarm(); - sdlog(1, Clock.read(), tempnotright,0,0,0); } Thread:: wait(5); } @@ -216,11 +216,11 @@ } else{ //Incorrect Temp Range - soundalarm(); sdlog(1, Clock.read(), degrees_c,0,0,0); uLCD.textbackground_color(RED); uLCD.locate(0,10); uLCD.printf("CORRECTION NEEDED!"); + soundalarm(); } } } \ No newline at end of file