Fatima Vunic
/
mbed_test
Test Programm
Diff: main.cpp
- Revision:
- 1:b6f2a3f6e8eb
- Parent:
- 0:7b78c5f07317
- Child:
- 2:b43b5da6f341
diff -r 7b78c5f07317 -r b6f2a3f6e8eb main.cpp --- a/main.cpp Mon Jan 13 17:24:38 2020 +0000 +++ b/main.cpp Mon Jan 13 17:31:07 2020 +0000 @@ -4,7 +4,7 @@ //int modifybBit (int x, unsigned char position, bool State); //int lauflicht (bool richtung, int time, int &anz); -//void nibbleLeds (int value); +void nibbleLeds (int value); //void printb (uint8_t x); BusOut myleds(LED1, LED2, LED3, LED4); @@ -13,10 +13,13 @@ const int INIT = 0x03; int main() { - while(1) { - myleds = 0x05; - if(button) - myleds = 0x0A; - wait(0.1); - } - } \ No newline at end of file + int anzahl, anz; + uint8_t value = INIT; + + nibbleLeds(value); + wait (0.1); + } + + void nibbleLeds(int value){ + myleds = value%16; + } \ No newline at end of file