Saturday, 18 September 2010

BusPirate oscilloscope python script

Some time ago I wrote a simple oscilloscope script for Bus Pirate.
Pygame and pyBusPirateLite libraries are needed to run it. Unfortunately the BusPirate firmware sends data collected by ADC very slowly so it's working rather as a live-plot than a real oscilloscope but even though it may be useful.

v 1.0

v 1.2

edit this line in so it points to BusPirate
BUS_PIRATE_DEV = "/dev/ttyUSB0"
Connect ADC and GND lines.
Run and have fun :)

Download here:

New version:
Working only with modified firmware (ADC modification 20.09.2010):
New features:
- trigger on rising/falling slope
- time scaling


Ian said...


ben nguyen said...


I use Bus Pirate with either hyperterminal or the GUI (pirateship).

I would love to use the GUI to run batches of commands at once, ala python script, but I don't know how! What do you use to read the script and send the usb serial commands?

hwmayer said...

I use pyBusPirateLite python library for communicating with BP. As well as I'm concerned it's not possible to use BP via terminal and 'Bitbang' (the binary access mode) in the same time. If you want to execute a set of BP commands while in terminal mode then probably you could use 'minicom' which has an ability to execute scripts. Please look for more help on BP forum.