Simple blink script fails rarely and randomly?

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
Jibun no kage
Posts: 144
Joined: Mon Jul 25, 2022 9:45 pm

Simple blink script fails rarely and randomly?

Post by Jibun no kage » Mon Aug 08, 2022 10:36 pm

Simple blink script fails rarely and randomly?

Code: Select all

#
# Test On Board Diode
#

from machine import Pin
from time import sleep

#

thePin=Pin('LED', Pin.OUT, value=0)

thePin.value(1)
sleep(1)
thePin.value(0)
The script runs, but the LED is never turned on or off it seems. To get it to work again, I have to remove power from the Pico W by removing USB cable. Then after USB cable insert, and Pico boot, return of REPL, the script will work until it does not again. This has happened 3 or 4 times.

I am running a recent nightly build, rather than the stable build. Here is the question, is there a way to enable lower level logging or something to see if that illustrates what is happening? Sure, if I install DEBUG pins, that is just a serial console connection via USB base UART right?

But was thinking but trying out this https://github.com/majbthrd/pico-debug Any one use this?

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Simple blink script fails rarely and randomly?

Post by jimmo » Thu Aug 11, 2022 1:24 am

Which version of MicroPython are you using? The 1.19.1 release?

This might be https://github.com/micropython/micropython/issues/8904 -- perhaps try using a nightly build.

Jibun no kage
Posts: 144
Joined: Mon Jul 25, 2022 9:45 pm

Re: Simple blink script fails rarely and randomly?

Post by Jibun no kage » Thu Aug 11, 2022 2:10 am

I am using an updated nightly build, the issue still happens once in a while. But less than it was from a build a few days ago.

Post Reply