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: mbed
Revision 0:2698b32ea006, committed 2015-10-14
- Comitter:
- Berni
- Date:
- Wed Oct 14 14:26:13 2015 +0000
- Commit message:
- 1
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 |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Wed Oct 14 14:26:13 2015 +0000
@@ -0,0 +1,11 @@
+#include "mbed.h"
+AnalogIn ain(A0); //Dem analogen eingangswert eine Variable zuweisen und den dazugehörigen Pin
+BusOut myled(P1_13,P1_12,P1_7,P1_6,P1_4,P1_3,P1_1,P1_0,LED4,LED3,LED2,LED1); //Bus definieren mit den LEDs als ausgang
+Serial pc(USBTX, USBRX); // tx, rx
+int main() {
+ while(1)
+ {
+ myled = ain.read_u16()/64; //ausgabe auf die LEDs, der Wert des Potentiometers wird mit 64 dividiert um 10Bit anzuzeigen
+ pc.printf("%d\n",myled);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Oct 14 14:26:13 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/4fc01daae5a5 \ No newline at end of file