blink_the_led
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| blink_the_led [2026/06/12 23:06] – [Introduction] walkeradmin | blink_the_led [2026/06/17 16:37] (current) – [Introduction] walkeradmin | ||
|---|---|---|---|
| Line 15: | Line 15: | ||
| Look at the following Micro Python code: | Look at the following Micro Python code: | ||
| \\ | \\ | ||
| - | <code | download> | + | <code: |
| from picozero import pico_led | from picozero import pico_led | ||
| pico_led.blink(0.5) | pico_led.blink(0.5) | ||
| Line 23: | Line 23: | ||
| \\ | \\ | ||
| \\ | \\ | ||
| + | So, why would we use the flashing version, that has multiple lines of code over using the 2 lines of code blinking version?? Well the answer is quite simple: | ||
| + | \\ | ||
| + | \\ | ||
| + | * 1. If you use the blinking version, the code is simple. | ||
| + | |||
| + | * 2. If you use the flashing version, the code is slightly more complex but you get control over the duty cycle, that is you can have the led on longer than it is off, or visa-versa. | ||
| + | \\ | ||
| + | There might be other reasons, I just have not thought about them :) | ||
| + | \\ | ||
| + | \\ | ||
| + | ---- | ||
blink_the_led.1781305612.txt.gz · Last modified: by walkeradmin
