Replies: 1 comment
-
Thanks for sharing. I am doing micropython in Raspberry PI Pico. Maybe I will start with esp too someday. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Learning to program n Micropython. The best way I have learned is by using mini snippets like this and piecing them together to make things work.
Wemos ESP8266 Lite;
This script blinks the LED via PWM
PWM Frequency causing the LED to flash on/off
PWM Duty Cycle to adjust the brightness
This created an interesting flash pattern.
By: Nick Sebring
03-20-23
`from machine import Pin, PWM
from time import sleep
frequency = 5
led = PWM(Pin(5), frequency)
while True:
for duty_cycle in range(0, 75):
led.duty(duty_cycle)
sleep(.0025)`
Beta Was this translation helpful? Give feedback.
All reactions