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:
- bulmecisco
- Date:
- 2015-04-16
- Revision:
- 1:ca7fdf2e285d
- Parent:
- 0:6d28be2dcb7c
- Child:
- 2:1115b3fa7fde
File content as of revision 1:ca7fdf2e285d:
#include "mbed.h"
#include "const.h"
#include "ur_Bertl.h"
int main()
{
ur_Bertl karel;
while(karel.AnyBeeperInBag())
{
}
karel.TurnLedOff(LED_ALL);
while(1)
{
if( karel.IsButtonPressed(BTN_FLL))
karel.NibbleLeds(0x01);
if( karel.IsButtonPressed(BTN_FL))
karel.NibbleLeds(0x02);
if( karel.IsButtonPressed(BTN_FM))
karel.NibbleLeds(0x0F);
if( karel.IsButtonPressed(BTN_FR))
karel.NibbleLeds(0x04);
if( karel.IsButtonPressed(BTN_FRR))
karel.NibbleLeds(0x08);
if( karel.IsButtonPressed(BTN_BL))
karel.NibbleLeds(0x0E);
if( karel.IsButtonPressed(BTN_BM))
karel.NibbleLeds(0x09);
if( karel.IsButtonPressed(BTN_BR))
karel.NibbleLeds(0x07);
else
karel.NibbleLeds(0x00);
}
}