Metadata-Version: 2.5
Name: esplink
Version: 2.0.1
Summary: 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-URL: Homepage, https://github.com/HamzaYslmn/esplink
Author: HamzaYslmn
Keywords: ble,bridge,esp32,espnow,firmata,gpio,i2c,raspberry-pi,serial,spi
Requires-Python: >=3.13
Requires-Dist: bleak>=3.0.2
Requires-Dist: pyserial>=3.5
Provides-Extra: all
Requires-Dist: esptool>=5.6; extra == 'all'
Requires-Dist: fastmcp>=4.1; extra == 'all'
Requires-Dist: pillow>=13; extra == 'all'
Provides-Extra: flash
Requires-Dist: esptool>=5.6; extra == 'flash'
Provides-Extra: mcp
Requires-Dist: fastmcp>=4.1; extra == 'mcp'
Provides-Extra: oled
Requires-Dist: pillow>=13; extra == 'oled'
Description-Content-Type: text/markdown

# esplink

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.

```python
from esplink import Bridge

with Bridge() as esp:                      # USB first, then Bluetooth, then Wi-Fi
    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/esplink>**
- Works on Raspberry Pi OS, Linux, Windows, macOS (Python ≥ 3.13, pyserial).
- `esplink` CLI: connection info; `esplink ports`: list candidate ports.
