István Cserny
/
Lab01_rgb_led
Cylce through colors of a common cathode RGB LED by using BusOut object class
Diff: main.cpp
- Revision:
- 0:ee49cf1985be
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Sep 22 13:24:34 2021 +0000 @@ -0,0 +1,13 @@ +#include "mbed.h" + +BusOut rgbled(D5, D6, D7); // RGB outputs + +int main() +{ + while (true) { + for(int i=0; i<8; i++) { + rgbled = i; + wait(2.0); + } + } +} \ No newline at end of file