test1

Dependencies:   LCD_DISCO_F429ZI mbed BSP_DISCO_F429ZI

Files at this revision

API Documentation at this revision

Comitter:
paperclip
Date:
Mon Apr 13 20:48:01 2020 +0000
Commit message:
test1;

Changed in this revision

BSP_DISCO_F429ZI.lib Show annotated file Show diff for this revision Revisions of this file
LCD_DISCO_F429ZI.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
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r efae4093560f BSP_DISCO_F429ZI.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/BSP_DISCO_F429ZI.lib	Mon Apr 13 20:48:01 2020 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/teams/ST/code/BSP_DISCO_F429ZI/#53d9067a4feb
diff -r 000000000000 -r efae4093560f LCD_DISCO_F429ZI.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LCD_DISCO_F429ZI.lib	Mon Apr 13 20:48:01 2020 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/teams/ST/code/LCD_DISCO_F429ZI/#dc55a068bc1a
diff -r 000000000000 -r efae4093560f main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Apr 13 20:48:01 2020 +0000
@@ -0,0 +1,71 @@
+#include "mbed.h"
+#include "LCD_DISCO_F429ZI.h"
+
+LCD_DISCO_F429ZI lcd;
+
+DigitalOut led1(LED1);
+
+int main()
+{      
+    led1 = 1;
+    int temp = 60;
+    int MAX_TEMP = 90;
+    float MAX_PRESSURE = 1.2;
+    int tempUp = true;
+    int presUp = true;
+    float pressure = 1.0;
+    BSP_LCD_SetFont(&Font20);
+    lcd.DisplayStringAt(0, LINE(1), (uint8_t *)"MBED EXAMPLE", CENTER_MODE);
+    wait(1);
+  
+    while(1){
+            if (temp <= 0) {
+                  tempUp = true;
+            };
+            if (temp >= MAX_TEMP) {
+                  tempUp = false;
+            };
+            if (tempUp) {
+                  temp++;
+            } else {
+                  temp = temp - 1;
+            }
+      //lcd.Clear(LCD_COLOR_BLUE);
+      //lcd.SetBackColor(LCD_COLOR_BLUE);
+      //lcd.SetTextColor(LCD_COLOR_WHITE);
+      //(0.3);
+      char str[100];
+      sprintf(str, "%d", temp);
+      lcd.DisplayStringAt(0, LINE(4), (uint8_t *)"The temperature", CENTER_MODE);
+      lcd.DisplayStringAt(0, LINE(5), (uint8_t *)"is ", CENTER_MODE);
+      lcd.DisplayStringAt(0, LINE(6), (uint8_t *)str, CENTER_MODE);
+      
+      wait(0.1);
+/*
+      lcd.Clear(LCD_COLOR_GREEN);
+      
+      lcd.SetTextColor(LCD_COLOR_BLUE);
+      lcd.FillRect(10, 20, 50, 50);
+      //wait(0.1);
+      lcd.SetTextColor(LCD_COLOR_BROWN);
+      lcd.FillCircle(80, 80, 50);
+      //wait(0.1);
+      lcd.SetTextColor(LCD_COLOR_YELLOW);
+      lcd.FillEllipse(150, 150, 50, 100);
+      //wait(0.1);
+      lcd.SetTextColor(LCD_COLOR_RED);
+      lcd.FillCircle(200, 200, 40);
+      //wait(1);
+
+      lcd.SetBackColor(LCD_COLOR_ORANGE);
+      lcd.SetTextColor(LCD_COLOR_CYAN);
+      BSP_LCD_SetFont(&Font24);
+      lcd.DisplayStringAt(0, LINE(7), (uint8_t *)"HAVE FUN !!!", CENTER_MODE);
+      //wait(1);
+
+      led1 = !led1;
+      wait(0.5);
+      */
+    }
+}
+
diff -r 000000000000 -r efae4093560f mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Apr 13 20:48:01 2020 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file