I downloaded and extracted the .zip file (download link) and found the file Pico_ePaper-2.13.py It also looks like there are a few variants of this file. Perhaps these are for slightly different hardware models, or for running a different demo.
In any case, the important part is here in the code:
if __name__=='__main__':
This tells us that we can either;
Treat the file as a module and import it . import Pico_ePaper-2.13.py
or
Execute the file directly, so long as it is saved to the pico as main.py. The file contains a short demo at the end, and this code interrogates the name of the entry point (the file name). Then the file will run whenever the Pico reboots (Ctrl+D)
We’ll go with the second option for the simple “hello world”
It will be really helpful if you can provide a photograph of how the pico is mounted in the display. I know you might already have jumped through those hoops with support - but we’re best off having all the information here in the public forum.
If you’re having trouble installing MicroPython, just follow Chapter 1.6 of our Pico Workshop exactly, and you ought to get to the point where you have a pico connected to your computer, and showing up in the Thonny file pane.
This has resolved the first difficulty and I now have the Pico running the 2in13 V2 as expected. I have a newer 2in13 V4 which does not run and I am having difficulty sorting out why that is so. It would be good to have the V2 and the V4 running from the same main.py file by sensing the version and using defines for the compilation.
If someone has done this or has info on it, I would be grateful to hear of it.
Otherwise, Michael, thank you for resolving the basic issue of the ‘dead’ picos which Thonny easily ‘revives’ with a micropython install or update Micropython process.
Glad to here you’re on your way @trevor9971
As a sanity-check, it appears the V4 has a different example file. Have you tried running the following example already? Pico_ePaper-2.13_V4.py
I have tried the Pico_ePaper-2.13_V4.py as main.py but it does not show any ePaper activity.For interest I have done swaps of boards and epaper displays but the only ePaper I can get working is the V2.
The V4 program does not show anything on the V2 display. More investigation needed. Does Core have any V2 2in13_ePaper units if I cannot resolve this?
Update : It appears that the V4.py code is meant to run on a Raspberry Pi. I have been trying it on a MAC and I am do not understand why the logging import has not given an error in Thonny.
From Wavesharethe Arduino file epd2in13.ino ( dated 9/9/2017 ) appears to load but does not drive the V4 device OR the V2 which runs fine from micropython.
Arduino 1.8.19
rp2040load 1.0.6 - compiled with go1.16.2
Loading into Flash: [==============================] 100%
Arduino 2.2.1
Resetting /dev/cu.usbmodem26241
Converting to uf2, output size: 177152, start address: 0x2000
Scanning for RP2040 devices
Flashing /Volumes/RPI-RP2 (RPI-RP2)
Wrote 177152 bytes to /Volumes/RPI-RP2/NEW.UF2
Since then added to Phil Lightowler Pico library but same (ie no ) reulst.
Where are you getting these hardware revision numbers from?
can you please post some pictures of the units you are working with front+back so we can all get on the same page?
The V4 code on the repo looks like it’s intended for Pico (because it uses the machine library, a library for MicroPython)
Perhaps the code download on the waveshare wiki is obsolete, and we should rely on downloads from the Github repo instead to get the latest code.