A simple program to control the color of RGB LED.
Dependencies: mbed
main.cpp
- Committer:
- tbjazic
- Date:
- 2014-12-18
- Revision:
- 0:e04286461404
File content as of revision 0:e04286461404:
#include "mbed.h" PwmOut red(p23); PwmOut green(p24); PwmOut blue(p25); AnalogIn pot1(p19); AnalogIn pot2(p20); DigitalIn center(p14); // joystick center int main() { while(1) { red = 1 - pot1; green = 1 - pot2; blue = 1 - center; } }