ELEC350 Coursework Repository
Dependencies: TextLCD mbed-rtos mbed
Diff: main.cpp
- Revision:
- 0:8f564feffdd8
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sat Nov 25 15:39:56 2017 +0000 @@ -0,0 +1,25 @@ +#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); + } +}