cagdas d
/
lauftest
initial commit and publish
main.cpp@0:886ff6a91b2c, 2020-01-13 (annotated)
- Committer:
- kafka
- Date:
- Mon Jan 13 17:13:54 2020 +0000
- Revision:
- 0:886ff6a91b2c
- Child:
- 1:dcfefb503be4
inital commit;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
kafka | 0:886ff6a91b2c | 1 | #include "mbed.h" |
kafka | 0:886ff6a91b2c | 2 | // #define BUTTON1 A1 |
kafka | 0:886ff6a91b2c | 3 | #define BUTTON1 p14 |
kafka | 0:886ff6a91b2c | 4 | BusOut myLeds(LED1,LED2,LED3,LED4); |
kafka | 0:886ff6a91b2c | 5 | DigitalIn button(BUTTON1); |
kafka | 0:886ff6a91b2c | 6 | |
kafka | 0:886ff6a91b2c | 7 | void nibbleLeds(int value); |
kafka | 0:886ff6a91b2c | 8 | |
kafka | 0:886ff6a91b2c | 9 | const int INIT = 0x03; |
kafka | 0:886ff6a91b2c | 10 | |
kafka | 0:886ff6a91b2c | 11 | |
kafka | 0:886ff6a91b2c | 12 | int main() { |
kafka | 0:886ff6a91b2c | 13 | int anzahl, anz; |
kafka | 0:886ff6a91b2c | 14 | uint8_t value = INIT; |
kafka | 0:886ff6a91b2c | 15 | // anzahl = lauflicht(true, 400, anz = 0); |
kafka | 0:886ff6a91b2c | 16 | |
kafka | 0:886ff6a91b2c | 17 | printf("anzahl = %d\n", anzahl); |
kafka | 0:886ff6a91b2c | 18 | nibbleLeds(value); |
kafka | 0:886ff6a91b2c | 19 | wait(0.1); |
kafka | 0:886ff6a91b2c | 20 | |
kafka | 0:886ff6a91b2c | 21 | } |
kafka | 0:886ff6a91b2c | 22 | } |