Jack Hansdampf / Mbed OS HC05__TI4_F401

Dependencies:   LCD_i2c_GSOE

Files at this revision

API Documentation at this revision

Comitter:
jack1930
Date:
Thu Oct 14 10:16:51 2021 +0000
Parent:
0:ee2d5dc1290a
Commit message:
F401

Changed in this revision

LCD_i2c_GSOE.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-os.lib Show annotated file Show diff for this revision Revisions of this file
--- a/LCD_i2c_GSOE.lib	Wed Aug 18 15:11:14 2021 +0000
+++ b/LCD_i2c_GSOE.lib	Thu Oct 14 10:16:51 2021 +0000
@@ -1,1 +1,1 @@
-https://os.mbed.com/users/jack1930/code/LCD_i2c_GSOE/#c3d157395c16
+https://os.mbed.com/users/jack1930/code/LCD_i2c_GSOE/#e02aaac1b3cf
--- a/main.cpp	Wed Aug 18 15:11:14 2021 +0000
+++ b/main.cpp	Thu Oct 14 10:16:51 2021 +0000
@@ -11,8 +11,9 @@
 // Blinking rate in milliseconds
 #define BLINKING_RATE_MS                                                    500
 
-BufferedSerial hc05(PB_10,PB_11,9600);
+BufferedSerial hc05(PB_6,PB_7,9600);
 PortOut anzeige(PortC,0xFF);
+DigitalIn taste(PA_6);
 lcd mylcd;
 char c;
 
@@ -22,22 +23,26 @@
     char daten[6]="Hallo";
     // Initialise the digital pin LED1 as an output
     DigitalOut led(PA_5);
-
+    taste.mode(PullDown);
     mylcd.clear();
     mylcd.cursorpos(0);
+    mylcd.printf("Hallo");
     while (true) {
         led = !led;
+            daten[0]='*';
+            daten[1]='T';
+            daten[2]='x';            
+            if (taste) daten[3]='y';
+            else daten[3]='z';
+            daten[4]='*';
+            
+            hc05.write(daten,4);
         if (hc05.readable()) 
         {
             hc05.read(&c,1);
             mylcd.printf("%c",c);
-            daten[0]='*';
-            daten[1]='T';
-            daten[2]=c;
-            daten[3]='*';
-            
-            hc05.write(daten,4);
+
         }
-        //thread_sleep_for(BLINKING_RATE_MS);
+        thread_sleep_for(BLINKING_RATE_MS);
     }
 }
--- a/mbed-os.lib	Wed Aug 18 15:11:14 2021 +0000
+++ b/mbed-os.lib	Thu Oct 14 10:16:51 2021 +0000
@@ -1,1 +1,1 @@
-https://github.com/ARMmbed/mbed-os/#aa70f680bb5755e8fea3f93fc6e04d9b3de235bb
+https://github.com/ARMmbed/mbed-os/#b1796dedeb8accde1cbaecf136fab96895e23d81