Eivind Dammen
/
LAB07_Oppgave2
oppg2
Fork of LAB07_Oppgave2 by
main.cpp
- Committer:
- rlanghbv
- Date:
- 2015-09-20
- Revision:
- 0:78adfca8ca69
- Child:
- 1:2e42c8846b90
File content as of revision 0:78adfca8ca69:
#include "mbed.h" InterruptIn TachInput(PB_3); BusOut Leds(PA_9,PC_7,PB_6,PA_7,PA_6,PA_5,PB_5,PB_4); static int teller=0; void TachSensed() { teller=teller+1; } int main() { TachInput.fall(&TachSensed); while (true) { teller=0; TachInput.enable_irq(); wait_ms(1000); TachInput.disable_irq(); Leds=~ ((1<< teller) -1); } }