
My program
main.cpp
- Committer:
- seppedewitte
- Date:
- 2020-02-10
- Revision:
- 0:bb704115e7df
File content as of revision 0:bb704115e7df:
#include "mbed.h" #include "platform/mbed_thread.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("Potentio 1 = %.2f", (float)pot1); lcd.locate(0,14); lcd.printf("Potentio 2 = %.2f", (float)pot2); r = (float)pot1; g = (float)pot1; b = (float)pot2; thread_sleep_for(0.1); } }