Main.py Booting offline problem with e-Paper 2.13

Loaded Waveshare test code via Thonney, for the Raspberry Pi pico-ePaper-2.13.

Renamed it Main.py

https://www.waveshare.com/w/upload/2/27/Pico_ePaper_Code.zip

It only runs from the PC as Main.py. It does not run in self boot mode on power-up even when renamed “main.py”
What am I doing wrong?

The display is brilliant, totally sunlight readable.

Are you sure you’re actually uploading code to your Pico? It’s an easy mistake.

Have you got any screenshots or screen recordings of how you’re trying to upload code to the Pico?

LICECap is pretty quick and easy:
https://www.cockos.com/licecap/

Other good options are windows step recorder: Win+R and type: psr and hit OK
Or windows game bar screen recorder: Win+Alt+R (Win+G to open the Gamebar interface).

yep,
It is uploading as once starting it running I can shut the PC window and it keeps running.
Changed code to write 1 to 100 at base of screen.

Alan

Also, can you upload photos of how you’ve got it hooked up and connected?

Hi Oliver
See Attached pico procedure
This started out as a simple project for the Mens Shed in Wynnum. There are a few Raspberry Pi enthusiasts. Average age 65!! Split between database and real-time interest groups.

Alan Bothe

Saving procedure_2.pdf (688 KB)

1 Like

Oliver

This may help. D does soft reboot.

MPY: soft reboot
init
busy
busy release
busy
busy release
busy
busy release
Traceback (most recent call last):
File “main.py”, line 298, in
File “main.py”, line 285, in Clear
KeyboardInterrupt:
MicroPython v1.15 on 2021-04-18; Raspberry Pi Pico with RP2040
Type “help()” for more information.

Alan Bothe

Partly solved.

Added LED marker at startup and turned LED off after first 2 seconds into program. Runs fine when triggered from PC, BUT The LED flashes when booted on battery, but program stops a couple of lines later. Timing is not the same when running after selfbooting. Need to get the scope out.

Alan Bothe

1 Like

Toggling LED 25 from call to BUSY in ePaper code shows code is running on pico when booting in stand alone mode for a few seconds. Then BUSY loop gets locked on, . Simply Screen appears to not initialise as no visual updates occur. Got me beat.

Side issue Spec for ePaper 2.13 is for 3.3V, but module as supplied is hardwired to VSYS (5V).

1 Like

Problem solved. by Waveshare. Output pin must be initialised after SPI initialization.
"def init(self):
self.reset_pin = Pin(RST_PIN, Pin.OUT)
#------remove dc init line from here to below spi init-----
self.busy_pin = Pin(BUSY_PIN, Pin.IN, Pin.PULL_UP)
self.cs_pin = Pin(CS_PIN, Pin.OUT)
self.width = EPD_WIDTH
self.height = EPD_HEIGHT

    self.full_lut = lut_full_update
    self.partial_lut = lut_partial_update
    
    self.full_update = FULL_UPDATE
    self.part_update = PART_UPDATE
    
    self.spi = SPI(1)
    self.spi.init(baudrate=4000_000)
    self.dc_pin = Pin(DC_PIN, Pin.OUT)"
2 Likes