![](/media/cache/profiles/3b56beb4fb3143ab7f05335134909435.50x50_q85.jpg)
Variation - reads external variable resistor in voltages divider network on pin 18. Transition time defined.
main.cpp
- Committer:
- Chrisis
- Date:
- 2013-12-16
- Revision:
- 1:35dabcdf9c02
- Parent:
- 0:f86c572491c3
- Child:
- 2:81628a105aa0
File content as of revision 1:35dabcdf9c02:
#include "mbed.h" PwmOut r (p23); PwmOut g (p24); PwmOut b (p25); AnalogIn rP (p19); AnalogIn gP (p20); int main() { r.period(0.001); g.period(0.001); b.period(0.001); while(1) { r = rP; g = gP; b = 0.5; wait (0.01); } }