Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
- Committer:
- ralleboehm
- Date:
- 2014-05-31
- Revision:
- 0:59594d96b9ce
- Child:
- 1:b2a97244857c
File content as of revision 0:59594d96b9ce:
#include "mbed.h"
DigitalOut red(D7);
DigitalOut green(D6);
DigitalOut blue(D5);
int main() {
while(1)
{
red=0; //all off
green=0;
blue=0;
wait(1);
red=1; //just red
green=0;
blue=0;
wait(1);
red=0; //just green
green=1;
blue=0;
wait(1);
red=0; //just blue
green=0;
blue=1;
wait(1);
red=1; //yellow... red and green
green=1;
blue=0;
wait(1);
red=0; //cyan... green and bue
green=1;
blue=1;
wait(1);
red=1; //purple... red and blue
green=0;
blue=1;
wait(1);
red=1; //white... all
green=1;
blue=1;
wait(1);
}
}