[Raspberry Pi Pico] LED blinking problem

The Raspberry Pi is a series of credit card-sized single-board computers developed in the United Kingdom by the Raspberry Pi Foundation to promote the teaching of basic computer science in schools and developing countries.

Post Reply
User avatar
/RaspberryPi
Corporate
Posts: 2449
Joined: Wed Jun 05, 2019 1:29 am

[Raspberry Pi Pico] LED blinking problem

Post by /RaspberryPi »


Why does the LED on my pico keep blinking every 4 or 5 seconds? The code.py file is completely empty. I Inserted the following code to make the LED blink:

import digitalio import board import time led = digitalio.DigitalInOut(board.GP2) led.direction = digitalio.Direction.OUTPUT while True: led.value = True # Turn on the LED time.sleep(1) led.value = False # Turn off the LED time.sleep(1) and it works like it is supposed to. But when i delete everything again it blinks again every 4 to 5 seconds. I played around a bit and came to the conclusion that it blinks every time i reload the code. I use the Mu editor. And every time i pressed ctrl+D to manually reload, the LED blinks. so i figured that it had something to do with the autoreload. But It should do nothing when i reload it, because it is literally empty.
submitted by /u/Vexaros_
[link] [comments]

Source: https://www.reddit.com/r/raspberry_pi/c ... g_problem/
/RaspberryPi
Post Reply

Return to “Raspberry Pi Forum”