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 00010 // Blinking rate in milliseconds 00011 #define BLINKING_RATE_MS 500 00012 00013 lcd mylcd; 00014 00015 int main() 00016 { 00017 // Initialise the digital pin LED1 as an output 00018 DigitalOut led(PC_13); 00019 PortOut leds(PortB,0xF); 00020 PortIn dips(PortB,0xF0); 00021 DigitalOut pb2(PB_2); 00022 DigitalOut pb8(PB_8); 00023 mylcd.clear(); 00024 mylcd.cursorpos(0); 00025 mylcd.printf("Hallo welt"); 00026 while (true) { 00027 led = !led; 00028 leds=dips>>4; 00029 mylcd.cursorpos(0x40); 00030 mylcd.printf("%2X",leds+dips); 00031 pb8=pb2; //GPIOB Bit 2 => Bit 8 00032 thread_sleep_for(BLINKING_RATE_MS); 00033 } 00034 }
Generated on Thu Jul 14 2022 08:51:24 by
1.7.2