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: main.cpp
- Revision:
- 0:8f3f14579021
diff -r 000000000000 -r 8f3f14579021 main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Mon Sep 26 15:35:45 2016 +0000
@@ -0,0 +1,22 @@
+#include "mbed.h"
+#include "MODSERIAL.h"
+
+AnalogIn pot(A1);
+DigitalIn butje1(D3);
+DigitalIn butje4(D4);
+PwmOut myled(LED_GREEN);
+MODSERIAL pc(USBTX, USBRX);
+
+int main()
+{
+ //int i = 0;
+ pc.baud(115200);
+ pc.printf("hoi\n");
+ myled.period_ms(0.1);
+ while (true) {
+ float potje = pot.read();
+ wait(0.5f);
+ myled.write(potje);
+ pc.printf("%f \n \r ", potje);
+ }
+}
\ No newline at end of file