Metadata-Version: 2.5
Name: starbridge-hardware
Version: 4.5.0
Summary: Python SDK and offline firmware for StarBridge StarCore and StarDust boards
Project-URL: Homepage, https://github.com/HAOTIANGUO22/StarBridge
Project-URL: Documentation, https://github.com/HAOTIANGUO22/StarBridge#readme
Project-URL: Repository, https://github.com/HAOTIANGUO22/StarBridge
Project-URL: Issues, https://github.com/HAOTIANGUO22/StarBridge/issues
Author: StarBridge contributors
License: MIT License
        
        Copyright (c) 2026 StarBridge contributors
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: arduino,avr,education,esp32,hardware,iot,starbridge,starcore,stardust
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Education
Classifier: Topic :: Software Development :: Embedded Systems
Requires-Python: >=3.10
Provides-Extra: test
Requires-Dist: pytest<9,>=8; extra == 'test'
Description-Content-Type: text/markdown

# StarBridge Python SDK 4.5.0

Install the public distribution from PyPI:

```bash
python -m pip install starbridge-hardware
```

The PyPI distribution is named `starbridge-hardware`; the Python import package remains `starbridge`.

```python
from starbridge import Board, BoardType, Pin, PinMode

with Board.begin(BoardType.STARCORE_V2) as board:
    print(board.info())
    board.pin_mode(Pin.P0, PinMode.OUTPUT)
    board.digital_write(Pin.P0, True)

    print(board.dht11(Pin.P1).read())
    print(board.ultrasonic(Pin.P6, Pin.P7).read_cm())

    nfc = board.pn532().begin()
    print("PN532 UID:", nfc.scan())
```

The SDK communicates with protocol-v2 firmware. It does not silently fall back to the legacy protocol.

`Board.begin()` detects the serial port and reuses compatible firmware. On Windows, the official wheel contains precompiled StarCore V2 and StarDust firmware plus esptool and avrdude, so first-time provisioning works without Arduino IDE, Arduino CLI, installed board cores, or firmware source. Pass `port="COM7"` to override discovery or `force_flash=True` to request a new upload.

The wheel includes only the public Python SDK, precompiled flash images, their integrity manifests, and the Windows x86-64 flashing runtimes. Firmware production source remains in the repository's `firmware/` tree and is not copied into the wheel.

StarDust users select `BoardType.STARDUST` and use `StardustPin` for D2, D3, D5, D6, D9, D10, and A0-A3. See `docs/stardust-pinout.md` for its fixed AVR PWM frequencies and limitations.

Version 4.5.0 adds native ESP32 Wi-Fi, ESP-NOW, software serial and SNTP support, plus dependency-free host-side clients for time, weather, speech transcription and OpenAI-compatible chat APIs. Version 4.4.1 introduced generic PN532 NFC over I2C.
