pico-coder / sigrok-pico

Use a raspberry pi pico (rp2040) as a logic analyzer and oscilloscope with sigrok
727 stars 83 forks source link

Python driver? #32

Open tannewt opened 1 year ago

tannewt commented 1 year ago

Do you have a Python driver for this? Maybe one that uses PySerial? I'm looking into reimplementing sigrok-cli in Python with plugins so that hardware, file format and decoder support isn't blocked on a central repo.

tannewt commented 1 year ago

I've written a Python driver: https://github.com/pysigrok/hardware-raspberrypi-pico/blob/main/pysigrok_raspberrypi_pico.py

I've also modified the firmware a bit to support different boards: https://github.com/pysigrok/sigrok-pico

pico-coder commented 1 year ago

How do I run it? All of the python I've written are standalone python files I run from Spyder Python windows so I'm not very savy on this kind of thing. What do you use to plot the results?

tannewt commented 1 year ago

I just tested on windows. Usually I’m on Linux or Mac. To run it I installed python by typing ‘python’ into power shell. Then I ‘pip install pysigrok-hardware-raspberrypi-pico’.

There terse instructions here: https://github.com/pysigrok/pysigrok#quick-start

‘pysigrok-cli’ is meant to be compatible with ‘sigrok-cli’. So, it can write a .sr file you can load into pulseview.

We made a #pysigrok channel on the adafruit discord if you need help. https://adafru.it/discord

On Thu, Feb 9, 2023, at 10:40 PM, pico-coder wrote:

How do I run it? All of the python I've written are standalone python files I run from Spyder Python windows so I'm not very savy on this kind of thing. What do you use to plot the results?

— Reply to this email directly, view it on GitHub https://github.com/pico-coder/sigrok-pico/issues/32#issuecomment-1425262861, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAM3KJM35L5QPV4536CRCTWWXPHTANCNFSM6AAAAAAULUBYGY. You are receiving this because you authored the thread.Message ID: @.***>

pico-coder commented 5 months ago

I'm way behind in updates. Since you have 21 stars I'll assume what you have is useful. Rather than trying to merge what you have in (I'm nearly functionally illiterate in github) I think I may just add a link to your repo at my intro page, and close this out?