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:f077ff1db7a0
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Sat Aug 15 19:15:05 2020 +0000
@@ -0,0 +1,18 @@
+#include "mbed.h"
+
+AnalogIn pot1(p19);
+AnalogIn pot2(p20);
+
+PwmOut red_led(p23);
+PwmOut red_blue(p25);
+
+int main()
+{
+ while (1) {
+ red_led.write(pot1.read());
+ printf("red: %f ",pot1.read());
+ red_blue.write(pot2.read());
+ printf("blue: %f\n",pot2.read());
+ wait(0.01);
+ }
+}
\ No newline at end of file