I am trying to write a program where I input how many times I would like the onboard LED on a Raspberry Pi Pico H to blink, and then the LED blinking that number of times. However, when I run the attached code, I receive the following error:
File "<stdin>", line 19, in <module>
TypeError: unsupported types for __lt__: 'int', 'str'
My code is:
import time
number = input('How many times would you like the LED to blink?')
for i in range(0, number):
led.toggle()
time.sleep(1)
print('Done')
Does anyone know why I am receiving these errors and how to fix them? Thanks P.S. I just got my Raspberry Pi Pico H today so not really advanced yet.