Prototype

Dependencies:   mbed ButtonEventDemo

Committer:
Kelrath1984
Date:
Mon Jan 13 17:10:21 2020 +0000
Revision:
12:e4ee1507e722
Child:
13:024d65ed9c26
Lauflicht v0.01

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kelrath1984 12:e4ee1507e722 1 #include "mbed.h"
Kelrath1984 12:e4ee1507e722 2
Kelrath1984 12:e4ee1507e722 3 #define BUTTON1 p14
Kelrath1984 12:e4ee1507e722 4 #define INIT 0x03;
Kelrath1984 12:e4ee1507e722 5
Kelrath1984 12:e4ee1507e722 6
Kelrath1984 12:e4ee1507e722 7 int modifyBit(int x, unsigned char position, bool state);
Kelrath1984 12:e4ee1507e722 8 int lauflicht(bool richtung, int time, int &anz);
Kelrath1984 12:e4ee1507e722 9 //void nibbleLeds(int value);
Kelrath1984 12:e4ee1507e722 10 //void printb(uint_t x);
Kelrath1984 12:e4ee1507e722 11
Kelrath1984 12:e4ee1507e722 12 BusOut myleds(LED1, LED2, LED3, LED4);
Kelrath1984 12:e4ee1507e722 13 DigitalIn button(BUTTON1);
Kelrath1984 12:e4ee1507e722 14
Kelrath1984 12:e4ee1507e722 15 int main(){
Kelrath1984 12:e4ee1507e722 16 while(1){
Kelrath1984 12:e4ee1507e722 17 myleds=0x05;
Kelrath1984 12:e4ee1507e722 18 if(button)
Kelrath1984 12:e4ee1507e722 19 {
Kelrath1984 12:e4ee1507e722 20 myleds=0x0A;
Kelrath1984 12:e4ee1507e722 21 wait(0.1);
Kelrath1984 12:e4ee1507e722 22 }
Kelrath1984 12:e4ee1507e722 23 }
Kelrath1984 12:e4ee1507e722 24 }