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
Diff: main.cpp
- Revision:
- 0:2b3b9e3c61d7
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Tue Dec 18 19:11:37 2018 +0000
@@ -0,0 +1,23 @@
+#include "mbed.h"
+PwmOut R(p23);
+PwmOut G(p24);
+PwmOut B(p25);
+AnalogIn P2(p20);
+AnalogIn P1(p19);
+float ValR = 0;
+float ValB = 0;
+float Time = 0.001;
+
+int main() {
+ R.period(Time);
+ G.period(Time);
+ B.period(Time);
+ G.write(0.5);
+ while (1){
+ ValR = P1;
+ ValB = P2;
+ R.write(ValR);
+ B.write(ValB);
+ wait(0.01);
+ }
+}