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: PullUp.cpp
- Revision:
- 0:2f3bedf8ba32
diff -r 000000000000 -r 2f3bedf8ba32 PullUp.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/PullUp.cpp Wed Nov 03 15:25:27 2021 +0000
@@ -0,0 +1,16 @@
+#include "mbed.h"
+
+DigitalOut led(D7);
+DigitalIn bottone(D4);
+
+
+int main(){
+ bottone.mode(PullUp);
+ while(1){
+ if (bottone==0){
+ led=1;
+ }
+ else led=0;
+ }
+
+}
\ No newline at end of file