![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
TP7_DS_1_RGBs
Revision 0:008bb91fea13, committed 2015-11-02
- Comitter:
- rtk
- Date:
- Mon Nov 02 22:34:05 2015 +0000
- Commit message:
- .;
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r 008bb91fea13 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Nov 02 22:34:05 2015 +0000 @@ -0,0 +1,32 @@ +#include "mbed.h" + +DigitalOut Red(D5) ; +DigitalOut Green(D9) ; +DigitalOut Blue(D8) ; + +AnalogIn Right(A5) ; +AnalogIn Left(A4) ; +AnalogIn Up(A2) ; +AnalogIn Down(A3) ; +DigitalIn Center(D4) ; + + +int main() +{ + while(1) { + Red = !Up; + Green = !Down; + Blue = !Right; + if (Left) { + Red = 0; + Green = 0; + Blue= 1; + } + if (Center) { + Red = 0; + Green = 0; + Blue = 0; + } + + } +}
diff -r 000000000000 -r 008bb91fea13 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Nov 02 22:34:05 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/9296ab0bfc11 \ No newline at end of file