A simple program that controls the LED1 brightness by using potentiometer.

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
tbjazic
Date:
Thu Dec 18 12:30:47 2014 +0000
Commit message:
Initial commit.

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 80eb27fb5770 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Dec 18 12:30:47 2014 +0000
@@ -0,0 +1,10 @@
+#include "mbed.h"
+
+PwmOut led1(LED1);
+AnalogIn pot2(p20);
+
+int main() {
+    while(1) {
+        led1 = pot2;
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r 80eb27fb5770 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Dec 18 12:30:47 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/4fc01daae5a5
\ No newline at end of file