Cylce through colors of a common cathode RGB LED by using BusOut object class

Dependencies:   mbed

main.cpp

Committer:
cspista
Date:
2021-09-22
Revision:
0:ee49cf1985be

File content as of revision 0:ee49cf1985be:

#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);
        }
    }
}