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
- Committer:
- jack1930
- Date:
- 2021-12-17
- Revision:
- 2:f1e555ed22c1
- Parent:
- 0:d135ebd11ec3
File content as of revision 2:f1e555ed22c1:
/* 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"
// Blinking rate in milliseconds
#define BLINKING_RATE_MS 500
lcd mylcd;
char buf[16];
DigitalOut PC0(PC_0);
int main()
{
printf("Hello World !\n");
mylcd.clear();
mylcd.printf("Hallo Joerg");
mylcd.cursorpos(0x40);
DigitalOut led(LED1);
// Initalise PortB als 8Bit-Input Port mit Pullup
PortIn eingabe(PortB,0xFF);
eingabe.mode(PullDown);
while (true) {
if (eingabe==5)
{
led = 1;
}
else
{
led = !led;
thread_sleep_for(100);
}
}
}