
rgb
main.cpp
- Committer:
- timonclaerhout
- Date:
- 2020-02-10
- Revision:
- 4:1f114c172d80
- Parent:
- 1:5ac8fa71dfb4
File content as of revision 4:1f114c172d80:
#include "mbed.h" #include "C12832.h" // Blinking rate in milliseconds #define BLINKING_RATE_MS 500 C12832 lcd(D11, D13, D12, D7, D10); AnalogIn pot1 (A0); AnalogIn pot2 (A1); PwmOut r (D5); PwmOut g (D8); PwmOut b (D9); int main() { lcd.cls(); while(1) { lcd.locate(0,3); lcd.printf("Pot 1 = %.2f", (float)pot1); lcd.locate(0,14); lcd.printf("Pot 2 = %.2f", (float)pot2); r = (float)pot1; g = (float)pot1; b = (float)pot2; ; wait (0.1); } }