Download data/examples/02digital/button.bas from introvoyz041/tinybasic: direct link, hf CLI and curl.
- Browser
- Download file 287 Bytes
-
https://huggingface.co/datasets/introvoyz041/tinybasic/resolve/main/data/examples/02digital/button.bas
- Command line
-
hf download hf://datasets/introvoyz041/tinybasic/data/examples/02digital/button.bas
-
curl -L -o button.bas https://huggingface.co/datasets/introvoyz041/tinybasic/resolve/main/data/examples/02digital/button.bas
287 Bytes
| 10 REM "Button from Arduino examples" | |
| 20 B=2 | |
| 30 L=LED | |
| 40 S=0 | |
| 100 REM "setup() put your setup code here, to run once:" | |
| 110 PINM L, 1 | |
| 120 PINM B, 0 | |
| 200 REM "loop() put your main code here, to run repeatedly:" | |
| 210 FOR I | |
| 220 S=DREAD(B) | |
| 230 IF S=1 THEN DWRITE L, 1 ELSE DWRITE L, 0 | |
| 250 NEXT | |