Fun with Leds

Dependencies:   Bertl mbed

main.cpp

Committer:
bulmecisco
Date:
2015-11-16
Revision:
0:ff4de98c0835

File content as of revision 0:ff4de98c0835:

#include "mbed.h"
#include "const.h"
#include "Robot.h"

Robot bertl;
    
int main()
{
    bertl.NibbleLeds(0x0F);
    wait(1);                    // in Sekunden
    bertl.NibbleLeds(0x00);
    
    while(1)
    {
        wait_ms(500);           // in Millisekunden
        if(bertl.IsButtonPressed(BTN_BL))
        {
            bertl.TurnLedOn(LED_BL1);
        }
        if(bertl.IsButtonPressed(BTN_BR))
        {
            bertl.TurnLedOff(LED_BL1);
        }
    }
}