Skip to main content

Control every ESP32 peripheral from Python over USB serial or Bluetooth — GPIO, ADC, DAC, PWM, touch, I2C, SPI, UART, Wi-Fi sockets, BLE, ESP-NOW, RMT, 1-Wire, CAN, I2S, files, NVS, OTA

Project description

python-esp-bridge

Control every ESP32 peripheral from Python over USB serial — GPIO, PWM, ADC, DAC, touch, I2C, SPI, UART, Wi-Fi (with TCP/UDP sockets through the ESP32 radio) and BLE. Flash the bridge firmware once, then it's all Python.

from espbridge import Bridge

with Bridge() as esp:                      # Bluetooth first, then USB serial
    esp.gpio.mode(2, "output")
    esp.gpio.write(2, 1)
    print(esp.adc.read_mv(34), "mV")
    esp.i2c.init(sda=21, scl=22)
    print(esp.i2c.scan())
    esp.wifi.connect("ssid", "password")
    status, body = esp.net.http_get("http://example.com/")
  • On-device rules react without the host in the loop (esp.watch.add("adc", pin=34, above=3200, do=("pwm", 13, 0))), and esp.radio_off() silences Wi-Fi + Bluetooth entirely for jitter-sensitive realtime work (frees ~110 KB heap, unlocks the ADC2 pins).
  • Firmware (flash once with Arduino IDE) and full docs: https://github.com/HamzaYslmn/python-esp-bridge
  • Works on Raspberry Pi OS, Linux, Windows, macOS (Python ≥ 3.11, pyserial).
  • espbridge CLI: connection info; espbridge ports: list candidate ports.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_esp_bridge-0.16.0.tar.gz (1.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_esp_bridge-0.16.0-py3-none-any.whl (1.4 MB view details)

Uploaded Python 3

File details

Details for the file python_esp_bridge-0.16.0.tar.gz.

File metadata

  • Download URL: python_esp_bridge-0.16.0.tar.gz
  • Upload date:
  • Size: 1.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for python_esp_bridge-0.16.0.tar.gz
Algorithm Hash digest
SHA256 33f1003b38d632716fee08df0734392ccb78c56998ec43df3cabc31423ae1f5f
MD5 ffae5ffaeb0e240b8bcb997ba1a3deb4
BLAKE2b-256 719cc97b838c0e41ad8c337352a04ecb82d22986dea607ed79e80996941dc0cf

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_esp_bridge-0.16.0.tar.gz:

Publisher: pypi.yml on HamzaYslmn/python-esp-bridge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file python_esp_bridge-0.16.0-py3-none-any.whl.

File metadata

File hashes

Hashes for python_esp_bridge-0.16.0-py3-none-any.whl
Algorithm Hash digest
SHA256 34fd119f9e9105e89cb41019bb1bc70672e23f061b31f8d1350a0df608e3d983
MD5 c336499173c58ef865fc90a229cee9cb
BLAKE2b-256 b140e9e9e87a3da7ea5593575a00a4342887ee9b05808f3402b6db506782815a

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_esp_bridge-0.16.0-py3-none-any.whl:

Publisher: pypi.yml on HamzaYslmn/python-esp-bridge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page