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.
You are viewing an older revision! See the latest version
Blinky Codes 1
Blinky mit Klasse:¶
#include "mbed.h" class Blinky { DigitalOut _myled; public: Blinky(PinName ld) : _myled(ld) {} void LedOn() { _myled = 1; } void LedOff() { _myled = 0; } int read() { return _myled.read(); } }; Blinky led(LED1); //DigitalOut led(LED1); int main() { printf("Blink LED is now %d\n", led.read()); while (1) { led.LedOn(); wait_ms(500); led.LedOff(); wait_ms(500); } }