Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 0:ee2d5dc1290a
- Child:
- 1:adf6dea35aed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Wed Aug 18 15:11:14 2021 +0000
@@ -0,0 +1,43 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2019 ARM Limited
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+#include "mbed.h"
+#include "platform/mbed_thread.h"
+#include "LCD.h"
+#include <Callback.h>
+
+// Blinking rate in milliseconds
+#define BLINKING_RATE_MS 500
+
+BufferedSerial hc05(PB_10,PB_11,9600);
+PortOut anzeige(PortC,0xFF);
+lcd mylcd;
+char c;
+
+
+int main()
+{
+ char daten[6]="Hallo";
+ // Initialise the digital pin LED1 as an output
+ DigitalOut led(PA_5);
+
+ mylcd.clear();
+ mylcd.cursorpos(0);
+ while (true) {
+ led = !led;
+ 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);
+ }
+}