Main

Dependencies:   mbed

Committer:
muminhadzic
Date:
Mon Jan 13 17:44:17 2020 +0000
Revision:
1:2513045fcb59
Parent:
0:4c39745fe0c2
Child:
2:8784f9c96dca
nibbleLeds

Who changed what in which revision?

UserRevisionLine numberNew contents of line
muminhadzic 0:4c39745fe0c2 1 #include "mbed.h"
muminhadzic 0:4c39745fe0c2 2 #define BUTTON1 p14
muminhadzic 0:4c39745fe0c2 3 //#define BUTTON1 A1
muminhadzic 0:4c39745fe0c2 4
muminhadzic 1:2513045fcb59 5 //int lauflicht(bool richtung,int time, int &anz);
muminhadzic 0:4c39745fe0c2 6 //int modifyBit(int x, unsigned char position, bool State);
muminhadzic 1:2513045fcb59 7 void nibbleLeds(int value);
muminhadzic 0:4c39745fe0c2 8 //void printb(uint8_t x);
muminhadzic 0:4c39745fe0c2 9
muminhadzic 0:4c39745fe0c2 10 BusOut myleds(LED1,LED2,LED3,LED4);
muminhadzic 0:4c39745fe0c2 11 DigitalIn button(BUTTON1);
muminhadzic 0:4c39745fe0c2 12
muminhadzic 0:4c39745fe0c2 13 const int INIT = 0x03;
muminhadzic 0:4c39745fe0c2 14
muminhadzic 1:2513045fcb59 15 //**************************************************************
muminhadzic 0:4c39745fe0c2 16 int main() {
muminhadzic 1:2513045fcb59 17
muminhadzic 1:2513045fcb59 18 nibbleLeds(value);
muminhadzic 1:2513045fcb59 19 wait(0.1);
muminhadzic 0:4c39745fe0c2 20
muminhadzic 0:4c39745fe0c2 21 }
muminhadzic 1:2513045fcb59 22 //**************************************************************
muminhadzic 0:4c39745fe0c2 23
muminhadzic 1:2513045fcb59 24 void nibbleLeds(int value) {
muminhadzic 1:2513045fcb59 25 myleds= value%16;
muminhadzic 1:2513045fcb59 26 }