Greenhouse Climate Observation Module
Dependencies: BSP_DISCO_F746NG DHT
Diff: bootup.cpp
- Revision:
- 0:a5831f680465
- Child:
- 2:739ba85b7a90
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bootup.cpp Tue Jan 21 12:28:42 2020 +0000 @@ -0,0 +1,27 @@ +#include "mbed.h" // Mbed header from mbed-os version 5 +#include "stm32746g_discovery_lcd.h" // Last updated 27/11/2019 +#include "bootup.h" + +void bootup::LCD_Bootup() +{ + // Boot up LCD screen + BSP_LCD_Init(); // Starts up the LCD + BSP_LCD_LayerDefaultInit(LTDC_ACTIVE_LAYER, LCD_FB_START_ADDRESS); + BSP_LCD_SelectLayer(LTDC_ACTIVE_LAYER); + + // Clear the screen, add black background and red text + BSP_LCD_Clear(LCD_COLOR_BLACK); + BSP_LCD_SetBackColor(LCD_COLOR_BLACK); + BSP_LCD_SetTextColor(LCD_COLOR_RED); + + // Bootup Message + printf("Device is booting up \r\n"); // Debug statement that lets you know that the device is booting. + BSP_LCD_DisplayStringAt(0, 100, (uint8_t *) "HELLDROP GREENHOUSES", CENTER_MODE); // Company + BSP_LCD_DisplayStringAt(0, 150, (uint8_t *) "BIG HARD PLANTS", CENTER_MODE); // Tagline 1 + BSP_LCD_DisplayStringAt(0, 175, (uint8_t *) "IN A BIG HARD GREENHOUSE", CENTER_MODE); // Tagline 2 + HAL_Delay(5000); // Delay 10 seconds to simulate actual bootup + // Prep for display + BSP_LCD_Clear(LCD_COLOR_BLACK); + BSP_LCD_SetBackColor(LCD_COLOR_BLACK); + BSP_LCD_SetTextColor(LCD_COLOR_RED); +} \ No newline at end of file