![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
First LED Test
main.cpp
- Committer:
- niclasesterl
- Date:
- 2015-11-16
- Revision:
- 0:2b5e600743f4
File content as of revision 0:2b5e600743f4:
#include "mbed.h" #include "const.h" #include "Robot.h" Robot bertl; int main() { int x = 0.1; while(1) { bertl.NibbleLeds(0x0F); wait(x); bertl.NibbleLeds(0x00); wait(x); bertl.TurnLedOn(LED_BL2); wait(x); bertl.TurnLedOff(LED_BL2); wait(x); bertl.TurnLedOn(LED_BL1); wait(x); bertl.TurnLedOff(LED_BL1); wait(x); bertl.TurnLedOn(LED_FL2); wait(x); bertl.TurnLedOff(LED_FL2); wait(x); bertl.TurnLedOn(LED_FL1); wait(x); bertl.TurnLedOff(LED_FL1); wait(x); bertl.TurnLedOn(LED_FR1); wait(x); bertl.TurnLedOff(LED_FR1); wait(x); bertl.TurnLedOn(LED_FR2); wait(x); bertl.TurnLedOff(LED_FR2); wait(x); bertl.TurnLedOn(LED_BR1); wait(x); bertl.TurnLedOff(LED_BR1); wait(x); bertl.TurnLedOn(LED_BR2); wait(x); bertl.TurnLedOff(LED_BR2); wait(x); bertl.RGBLed(1,0,0); wait(x); bertl.RGBLed(0,1,0); wait(x); bertl.RGBLed(0,0,1); wait(x); bertl.RGBLed(0,0,0); } }