complete
Dependencies: 4DGL-uLCD-SE_ PinDetect SDFileSystem mbed
Fork of mythermostat by
Revision 6:5ba4232c5e1c, committed 2016-11-06
- Comitter:
- jboettcher
- Date:
- Sun Nov 06 22:08:58 2016 +0000
- Parent:
- 5:c73ebb00e86d
- Commit message:
- Complete
Changed in this revision
4DGL-uLCD-SE.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 |
--- a/4DGL-uLCD-SE.lib Tue Sep 06 21:36:17 2016 +0000 +++ b/4DGL-uLCD-SE.lib Sun Nov 06 22:08:58 2016 +0000 @@ -1,1 +1,1 @@ -https://mbed.org/users/4180_1/code/4DGL-uLCD-SE/#8100c7d2fe07 +https://developer.mbed.org/users/jboettcher/code/4DGL-uLCD-SE_/#8100c7d2fe07
--- a/main.cpp Tue Sep 06 21:36:17 2016 +0000 +++ b/main.cpp Sun Nov 06 22:08:58 2016 +0000 @@ -1,12 +1,9 @@ -// skeleton code for ECE 2036 thermostat lab -// code must be added by students #include "mbed.h" #include "TMP36.h" #include "SDFileSystem.h" #include "uLCD_4DGL.h" #include "PinDetect.h" #include "Speaker.h" -// must add your new class code to the project file Shiftbrite.h #include "Shiftbrite.h" #include <math.h> #include <iostream> @@ -108,33 +105,14 @@ pb3.setSampleFrequency(); pb4.setSampleFrequency(); // pushbuttons now setup and running - - - // start I/O examples - DELETE THIS IN YOUR CODE..BUT WILL USE THESE I/O IDEAS ELSEWHERE - // since all this compiles - the needed *.h files for these are in the project - // printf("Hello PC World\n\r"); // need terminal application running on PC to see this output uLCD.printf("\n\rJoe's Thermostat\n\r"); // LCD mySpeaker.PlayNote(500.0, 1.0, 1.0); // Speaker buzz -// myShiftbrite.write( 0, 50 ,0); // Green RGB LED - // SD card write file example - prints error message on PC when running until SD card hooked up - // Delete to avoid run time error -// mkdir("/sd/mydir", 0777); // set up directory and permissions -// FILE *fp = fopen("/sd/mydir/sdtest.txt", "w"); //open SD -// if(fp == NULL) { -// error("Could not open file for write\n"); -// } -// fprintf(fp, "Hello SD Card World!"); // write SD -// fclose(fp); // close SD card - // - // end I/O examples - - - enum Statetype { Off = 0, Heat_off, Heat_on, Cool_off, Cool_on }; - Statetype state = Off; - uLCD.locate(3,6); - uLCD.printf("OFF "); + enum Statetype { Off = 0, Heat_off, Heat_on, Cool_off, Cool_on }; + Statetype state = Off; + uLCD.locate(3,6); + uLCD.printf("OFF "); // State machine code below will need changes and additions while (1) { @@ -313,9 +291,6 @@ } wait(0.33); - // heartbeat LED - common debug tool - // blinks as long as code is running and not locked up - //myLED1=!myLED1; } } } \ No newline at end of file