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:
- 1:fb317288084d
- Parent:
- 0:ee837830d039
- Child:
- 2:73177929c8b4
--- a/main.cpp Thu Nov 29 17:02:15 2018 +0000
+++ b/main.cpp Thu Nov 29 17:16:30 2018 +0000
@@ -1,11 +1,13 @@
#include "mbed.h"
-BusOut myleds(LED1, LED2, LED3, LED4);
+BusOut allLeds(LED1, LED2, LED3, LED4);
+BusOut zweiLeds(LED1, LED2);
+
//DigitalOut led1(LED1);
//DigitalOut led2(LED2);
//DigitalOut led3(LED3);
//DigitalOut led4(LED4);
-
+DigitalIn btn(P14);
enum Status {ST_LEDOFF=0, ST_LEDEIN=1,};
Status volatile status;
@@ -96,9 +98,9 @@
printf("state: %d\n", stm.state);
switch (stm.state)
{
- case ST_EIN: stm.Ein();
+ case ST_LEDEIN: stm.Ein();
break;
- case ST_AUS: stm.Aus();
+ case ST_LEDOFF: stm.Aus();
break;
default: stm.Error();
break;