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
main.cpp
00001 #include "mbed.h" 00002 PwmOut R(p23); 00003 PwmOut G(p24); 00004 PwmOut B(p25); 00005 AnalogIn P2(p20); 00006 AnalogIn P1(p19); 00007 float ValR = 0; 00008 float ValB = 0; 00009 float Time = 0.001; 00010 00011 int main() { 00012 R.period(Time); 00013 G.period(Time); 00014 B.period(Time); 00015 G.write(0.5); 00016 while (1){ 00017 ValR = P1; 00018 ValB = P2; 00019 R.write(ValR); 00020 B.write(ValB); 00021 wait(0.01); 00022 } 00023 }
Generated on Sat Jul 23 2022 05:29:07 by
