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.
Dependencies: MFS_Display_HAL LCD_i2c_GSOE HSAnalogIn_GSOE
Diff: vorlageBit.cpp
- Revision:
- 0:645e47a5b9db
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vorlageBit.cpp Sat Jul 23 12:46:36 2022 +0000
@@ -0,0 +1,33 @@
+//mit if 1=aktivieren, if 0=deaktivieren
+#if 0
+
+#include "mbed.h"
+#include "LCD.h"
+
+DigitalOut myLed(PC_0);
+DigitalIn mySwitch(PB_0);
+
+lcd mylcd;
+
+void init()
+{
+ mylcd.clear();
+ mylcd.cursorpos(0);
+ mylcd.printf("Vorlage BIT");
+ mySwitch.mode(PullDown);
+}
+
+int main()
+{
+ init();
+ while(1)
+ {
+ bool onOff = mySwitch;
+ myLed = onOff;
+ mylcd.cursorpos(0x40);
+ if(mySwitch ==true) mylcd.printf("myLed AN ");
+ else mylcd.printf("myLed AUS");
+ }
+}
+#endif
+