Download 1/1.c from KeLe-open-code/MCU: direct link, hf CLI and curl.
- Browser
- Download file 556 Bytes
-
https://huggingface.co/KeLe-open-code/MCU/resolve/main/1/1.c
- Command line
-
hf download hf://KeLe-open-code/MCU/1/1.c
-
curl -L -o 1.c https://huggingface.co/KeLe-open-code/MCU/resolve/main/1/1.c
556 Bytes
| void delayMs(unsigned int i) | |
| { | |
| unsigned char t; | |
| while (i--) | |
| { | |
| for (t = 0; t < 120; t++); | |
| } | |
| } | |
| void main(void) | |
| { | |
| unsigned char i; | |
| while (1) | |
| { | |
| for (i = 0; i < 7; i++) | |
| { | |
| P2 = ~(1 << i); | |
| delayMs(500); | |
| } | |
| for (i = 5; i > 0; i--) | |
| { | |
| P2 = ~(1 << i); | |
| delayMs(500); | |
| } | |
| for (i = 0; i < 7; i++) | |
| { | |
| P2 = ~(1 << i); | |
| delayMs(500); | |
| } | |
| } | |
| } |