Ex 3

Dependencies:   mbed

Revision:
0:2e3f58a3a6ac
Child:
1:0dafa64a6494
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Oct 05 15:51:17 2017 +0000
@@ -0,0 +1,13 @@
+#include "mbed.h"
+DigitalIn potentiometer(p17); // digital input variable declaration
+DigitalOut led(LED1);// digital output variable declaration
+int main() {
+while(1) {
+if (potentiometer.read()) {
+    led = 1;
+    }
+else {
+led = 0;
+}   
+}
+}
\ No newline at end of file