Alle LED's leuchten bei verschiedenen Lichtstärkern SW1 Sw2 Sw3 Sw4 Taster test
Dependencies: mbed
main.cpp
- Committer:
- Thauser
- Date:
- 2015-04-30
- Revision:
- 0:30bb00ce736e
- Child:
- 1:f619bd48aa06
File content as of revision 0:30bb00ce736e:
/* M0-BOARD LPC11U24 VERSION 1.0 BULME Graz | Elektronik FSST Thomas Hauser | 3 AHELI KITTV3 */ #include "mbed.h" BusOut myled(P1_13,P1_12,P1_7,P1_6,P1_4,P1_3,P1_1,P1_0,LED4,LED3,LED2,LED1); int i; float t = 0.02; int main() { while(1) { myled = 0x001; wait(t); myled = 0x003; wait(t); myled = 0x007; wait(t); myled = 0x00F; wait(t); for (i = 1; i < 12; i++) { myled = myled << 1; wait(t); } myled = 0xC00; wait(t); myled = 0xE00; wait(t); myled = 0xF00; wait(t); for (i = 1; i < 11; i++) { myled = myled >> 1; wait(t); } } }