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.
main.cpp
00001 /* mbed Microcontroller Library 00002 * Copyright (c) 2019 ARM Limited 00003 * SPDX-License-Identifier: Apache-2.0 00004 */ 00005 00006 #include "mbed.h" 00007 #include "platform/mbed_thread.h" 00008 #include "LCD.h" 00009 #include <Callback.h> 00010 00011 // Blinking rate in milliseconds 00012 #define BLINKING_RATE_MS 500 00013 00014 BufferedSerial hc05(PB_10,PB_11,9600); 00015 PortOut anzeige(PortC,0xFF); 00016 lcd mylcd; 00017 char c; 00018 00019 00020 int main() 00021 { 00022 char daten[6]="Hallo"; 00023 // Initialise the digital pin LED1 as an output 00024 DigitalOut led(PA_5); 00025 00026 mylcd.clear(); 00027 mylcd.cursorpos(0); 00028 while (true) { 00029 led = !led; 00030 if (hc05.readable()) 00031 { 00032 hc05.read(&c,1); 00033 mylcd.printf("%c",c); 00034 daten[0]='*'; 00035 daten[1]='T'; 00036 daten[2]=c; 00037 daten[3]='*'; 00038 00039 hc05.write(daten,4); 00040 } 00041 //thread_sleep_for(BLINKING_RATE_MS); 00042 } 00043 }
Generated on Tue Sep 20 2022 10:45:17 by
1.7.2