from machine import Pin, PWM
from time import sleep
frequency = 5000
led = PWM(Pin(5), frequency)
while True:
for duty_cycle in range(0, 1024):
led.duty(duty_cycle)
sleep(0.005)
there is a syntex error when I attempt to run this.
File “<stdin>”,Line 1, in <module>
File “<string>”,line7
Not sure what this is. Im following the course so that did not help me. Can some one mabe explain what this is so I can correct this and learn something.
Thanks,
Tim
SyntexError:invalid sntex
I’m not a Python guy but I would guess that you have either not flashed your ESP32 with MicroPython or you haven’t installed the IDE correctly. I do know that Python relies on indentation so am assuming that’s correct in your code and it didn’t display correctly here on the forum.