fuck this
Dependencies: BMP280
LCD.h
- Committer:
- Swaggie
- Date:
- 2018-01-07
- Revision:
- 17:95b0b1ec0f90
- Parent:
- 16:1b3488fb67f5
- Child:
- 18:dff5292d62a9
File content as of revision 17:95b0b1ec0f90:
#ifndef __LCD__ #define __LCD__ /* *This class inherits the TextLCD class to add functionality to display enviromental readings, *with a scrolling display, or to display a specific message, which times out back *to scrolling, and to set the time using two push buttons. */ #include "mbed.h" #include "TextLCD.h" #include "rtos.h" #include <string> //These functions manage writing to the LCD class EnviromLCDDisplay : private TextLCD { private: //private variables enum ThreadState{MESSAGE,SCROLLREADINGS,ADJUSTTIME}; ThreadState _TState; //This determines what function the LCD is doing //Values to display float _temperature; float _pressure; float _ldr; string _message; //Objects to be used Thread _LCDThread; //Pointer to the therad that will be used for the LCD PinName _Button1Pin; //Button will change between InterruptIn and DigitalIn. Used to enter time edit mode DigitalIn _Button2; //Button2 bool _AutoQuit; //After message is displayed, should LCD return to SCROLLREADINGS? //private functions void LCDThreadFn(void); //This needs to be attached to a thread void TimeButtonISR(void); //Run when Button 1 is set as an interrupt in public: //public functions EnviromLCDDisplay(PinName rs, PinName e, PinName d4, PinName d5, PinName d6, PinName d7, PinName Button1Pin, PinName Button2); //Constructor //~EnviromLCDDisplay(); //Destructor bool POST(void); //Power On Self Test. Returns true if pass void Start(void); //Starts thread void DispMessage(string message, bool returnToReadings); //Display given message on screen }; #endif