Sensoren Test

Dependencies:   mbed

Committer:
asdfmaker333
Date:
Thu Apr 16 11:43:15 2015 +0000
Revision:
0:23efacfc4c60
Child:
1:6fb229756f2a
Sensoren Test Programm ;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
asdfmaker333 0:23efacfc4c60 1 #include "mbed.h"
asdfmaker333 0:23efacfc4c60 2 #include "const.h"
asdfmaker333 0:23efacfc4c60 3 #include "ur_Bertl.h"
asdfmaker333 0:23efacfc4c60 4 DigitalOut myled(LED1);
asdfmaker333 0:23efacfc4c60 5
asdfmaker333 0:23efacfc4c60 6 int main()
asdfmaker333 0:23efacfc4c60 7 {
asdfmaker333 0:23efacfc4c60 8 ur_Bertl karel;
asdfmaker333 0:23efacfc4c60 9
asdfmaker333 0:23efacfc4c60 10 while(1)
asdfmaker333 0:23efacfc4c60 11 {
asdfmaker333 0:23efacfc4c60 12
asdfmaker333 0:23efacfc4c60 13 if( karel.IsButtonPressed(BTN_FL))
asdfmaker333 0:23efacfc4c60 14 karel.NibbleLeds(0x0B);
asdfmaker333 0:23efacfc4c60 15 else
asdfmaker333 0:23efacfc4c60 16 karel.NibbleLeds(0x00);
asdfmaker333 0:23efacfc4c60 17 if( karel.IsButtonPressed(BTN_FLL))
asdfmaker333 0:23efacfc4c60 18 karel.NibbleLeds(0x0A);
asdfmaker333 0:23efacfc4c60 19 else
asdfmaker333 0:23efacfc4c60 20 karel.NibbleLeds(0x00);
asdfmaker333 0:23efacfc4c60 21 if( karel.IsButtonPressed(BTN_FM))
asdfmaker333 0:23efacfc4c60 22 karel.NibbleLeds(0x0C);
asdfmaker333 0:23efacfc4c60 23 else
asdfmaker333 0:23efacfc4c60 24 karel.NibbleLeds(0x00);
asdfmaker333 0:23efacfc4c60 25 }
asdfmaker333 0:23efacfc4c60 26 }