program dla Bartka xD

Dependencies:   mbed LCD_DISCO_F469NI BSP_DISCO_F469NI

Files at this revision

API Documentation at this revision

Comitter:
Adasqo
Date:
Mon May 20 09:16:38 2019 +0000
Commit message:
dla Bartka xD;

Changed in this revision

BSP_DISCO_F469NI.lib Show annotated file Show diff for this revision Revisions of this file
LCD_DISCO_F469NI.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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/BSP_DISCO_F469NI.lib	Mon May 20 09:16:38 2019 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/teams/ST/code/BSP_DISCO_F469NI/#3cdfcc4f7c9d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LCD_DISCO_F469NI.lib	Mon May 20 09:16:38 2019 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/teams/ST/code/LCD_DISCO_F469NI/#d38374480318
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon May 20 09:16:38 2019 +0000
@@ -0,0 +1,54 @@
+#include "mbed.h"
+#include "LCD_DISCO_F469NI.h"
+#include <string>
+#include <sstream>
+#include <stdio.h>
+
+LCD_DISCO_F469NI lcd;
+
+DigitalOut led1(LED1);
+AnalogIn analog_value(A0);
+
+
+int main()
+{    
+    lcd.SetBackColor(LCD_COLOR_BLUE);
+    lcd.SetTextColor(LCD_COLOR_WHITE);
+    uint8_t text[30];
+    float meas;   
+    //lcd.DisplayStringAt(0, LINE(1), (uint8_t *)"MBED EXAMPLE", CENTER_MODE);
+    wait(1);
+  
+    while(1)
+    {
+                   
+    meas = analog_value.read(); 
+    meas = meas * 3300;
+     
+    led1 = 0;
+    lcd.DisplayStringAt(0, LINE(9), (uint8_t *)"Nie ma wody", CENTER_MODE);
+ 
+    if(meas<2000){
+        lcd.Clear(LCD_COLOR_BLUE);
+        led1 = 1;
+        lcd.DisplayStringAt(0, LINE(9), (uint8_t *)"Jest woda", CENTER_MODE);
+
+    } 
+    //string a = tostr(meas);
+    //char buffer [10];
+    //sprintf (buffer, "%6.2f",meas);// datastream value
+    //string data = buffer;
+    //lcd.Clear(LCD_COLOR_BLUE);
+
+    //lcd.DisplayStringAt(0, LINE(10),(uint8_t *)"%6.2f",meas , CENTER_MODE);
+    sprintf((char*)text, "Pomiar: %f", meas);
+        lcd.DisplayStringAt(0, LINE(0), (uint8_t *)&text, LEFT_MODE);
+
+    //sprintf((char*)text, "Touches: 0");
+    //lcd.DisplayStringAt(0, LINE(0), (uint8_t *)&text, LEFT_MODE);
+    //lcd.DisplayStringAt(0, LINE(7), (uint8_t *)"BARDZO ELEGANCKI PROJEKT", CENTER_MODE);
+    wait(1);
+
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon May 20 09:16:38 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file