This shows you the differences between two versions of the page.
| logicpython:cubloc_api:low [2026/04/10 02:06] – created - external edit 127.0.0.1 | logicpython:cubloc_api:low [2026/04/14 04:03] (current) – [Example] mfranklin | ||
|---|---|---|---|
| Line 14: | Line 14: | ||
| <code python> | <code python> | ||
| - | from cubloc import Low | + | from time import sleep |
| + | from cubloc import | ||
| - | # Example usage | + | # LED on GP25, configured as an output |
| - | Low(0) | + | LED = 25 |
| + | Output(LED) | ||
| + | |||
| + | while True: | ||
| + | # Turn LED on for 500ms | ||
| + | High(LED) | ||
| + | print(" | ||
| + | sleep(0.5) | ||
| + | |||
| + | # Turn LED off for 500ms | ||
| + | | ||
| + | print(" | ||
| + | sleep(0.5) | ||
| </ | </ | ||