ELEC350 Coursework Repository
Dependencies: TextLCD mbed-rtos mbed
main.cpp
- Committer:
- thomasmorris
- Date:
- 2017-11-25
- Revision:
- 0:8f564feffdd8
File content as of revision 0:8f564feffdd8:
#include "mbed.h" #include "Led.h" #include "rtos.h" #include "TextLCD.h" Led GreenLed(D5); TextLCD lcd(A0, A1, A2, A3, A4, A5,TextLCD::LCD16x2); // rs, e, d4-d7 Sets up LCD float TimeBase = 0.5; Thread LCD; float LDR = 1.5; void LCD_Thread() { lcd.printf("LDR Value is %1.1f \n",LDR); } int main() { LCD.start(LCD_Thread); GreenLed.switchOff(); while(1) { GreenLed.Toggle(); wait(TimeBase); } }