Skip to content

99 Python

Geo edited this page Sep 7, 2025 · 11 revisions

Python Scripts for ESP32 Bus Pirate

https://github.com/geo-tp/ESP32-Bus-Pirate-Scripts

This repository provides a collection of ready-to-use Python scripts to interact, log, and automate hardware actions using the ESP32 Bus Pirate via serial communication.

Create Your Script

On the ESP32 Bus Pirate Scripts Repo. The BusPirate class abstracts serial communication and provides methods like:

from bus_pirate.bus_pirate import BusPirate

bp = BusPirate.auto_connect()  # Auto-detect the ESP32 Bus Pirate
bp.start()                     # Init connection + clear 
bp.change_mode("dio")          # Switch to I2C, UART, WiFi, etc.
bp.send("set 1 LOW")           # Send a command (string)
bp.wait()                      # Wait for response (default 300ms)
lines = bp.receive()           # Read lines from the device
lines = bp.receive_all(2)      # Read lines from the device until a given silent time
bp.stop()                      # Close connection

Additional Helper class to parse and manipulate response from the ESP32 Bus Pirate.

Clone this wiki locally