# Embedded Tester Protocol (ETP) library for Python
`etplib` allows access to microcontroller peripherals from a host computer. Microcontroller should be running the ETP firmware.
## Inital setup
- Install `etplib` using pip
```terminal
pip install etplib
```
- Download [ETP firmware for Arduino Uno](https://github.com/jabezwinston/etplib/releases/download/v0.1.0/etp_fw_arduino_uno_v0.1.0.hex) (the only supported device)
- Flash ETP firmware to the Arduino Uno using `avrdude` (Get avrdude [here](https://github.com/avrdudes/avrdude/releases/))
```terminal
avrdude -v -p atmega328p -c arduino -P COM4 -b 115200 -D -U flash:w:etp_fw_arduino_uno_v0.1.0.hex:i
```
> NOTE : Replace `COM4` with the port where the Arduino Uno is connected
## Usage
### Blink LED
```python
import etplib
import time
etp = etplib.ETP(transport='serial', port='COM4', baudrate=115200)
etp.open()
etp.reset()
etp.gpio.init({"_13": "output"})
# Blink LED on pin 13 of the Arduino Uno
while True:
etp.gpio_write({"_13": 1})
time.sleep(1)
etp.gpio_write({"_13": 0})
time.sleep(1)
etp.close()
```
Raw data
{
"_id": null,
"home_page": null,
"name": "etplib",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "embedded, firmware, test, protocol, gpio, i2c, adc, pwm",
"author": null,
"author_email": "Jabez Winston <jabezwinston@gmail.com>, Stephen Kingston <stephen.psk@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/54/9a/81b9e247a5f002ddc6cb4b47622564d3474f605abaea197f38b5b0d2a676/etplib-0.1.1.tar.gz",
"platform": null,
"description": "# Embedded Tester Protocol (ETP) library for Python\n\n`etplib` allows access to microcontroller peripherals from a host computer. Microcontroller should be running the ETP firmware.\n\n## Inital setup\n- Install `etplib` using pip\n ```terminal\n pip install etplib\n ```\n- Download [ETP firmware for Arduino Uno](https://github.com/jabezwinston/etplib/releases/download/v0.1.0/etp_fw_arduino_uno_v0.1.0.hex) (the only supported device)\n- Flash ETP firmware to the Arduino Uno using `avrdude` (Get avrdude [here](https://github.com/avrdudes/avrdude/releases/))\n\n ```terminal\n avrdude -v -p atmega328p -c arduino -P COM4 -b 115200 -D -U flash:w:etp_fw_arduino_uno_v0.1.0.hex:i\n ```\n> NOTE : Replace `COM4` with the port where the Arduino Uno is connected\n\n## Usage\n\n### Blink LED\n\n```python\nimport etplib\nimport time\n\netp = etplib.ETP(transport='serial', port='COM4', baudrate=115200)\netp.open()\netp.reset()\n\netp.gpio.init({\"_13\": \"output\"})\n\n# Blink LED on pin 13 of the Arduino Uno\nwhile True:\n etp.gpio_write({\"_13\": 1})\n time.sleep(1)\n etp.gpio_write({\"_13\": 0})\n time.sleep(1)\n\netp.close()\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Embedded Tester Protocol (ETP) Library",
"version": "0.1.1",
"project_urls": {
"Homepage": "https://www.embeddedtester.com/",
"Source code": "https://github.com/jabezwinston/etplib-python"
},
"split_keywords": [
"embedded",
" firmware",
" test",
" protocol",
" gpio",
" i2c",
" adc",
" pwm"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c4f2fbe2c00aa8116d5fccc93f9a07e1f5e5f6f0bf54f1adb29273419baed703",
"md5": "07d30f8f7174554c9bb146fe4cb4187a",
"sha256": "03f45cdb5f3f37fdf1e0b781126ac1a73e34200d26ce9fea9e593345cd13d617"
},
"downloads": -1,
"filename": "etplib-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "07d30f8f7174554c9bb146fe4cb4187a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 9928,
"upload_time": "2024-10-04T08:39:09",
"upload_time_iso_8601": "2024-10-04T08:39:09.837421Z",
"url": "https://files.pythonhosted.org/packages/c4/f2/fbe2c00aa8116d5fccc93f9a07e1f5e5f6f0bf54f1adb29273419baed703/etplib-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "549a81b9e247a5f002ddc6cb4b47622564d3474f605abaea197f38b5b0d2a676",
"md5": "32330e83c80d3a4405de0a896ea9b1d3",
"sha256": "fb30fa5af26fd9c91e0513db0da3fcfa1a3de169f4e9157ee1ae5375ee883198"
},
"downloads": -1,
"filename": "etplib-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "32330e83c80d3a4405de0a896ea9b1d3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 8099,
"upload_time": "2024-10-04T08:39:11",
"upload_time_iso_8601": "2024-10-04T08:39:11.567819Z",
"url": "https://files.pythonhosted.org/packages/54/9a/81b9e247a5f002ddc6cb4b47622564d3474f605abaea197f38b5b0d2a676/etplib-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-04 08:39:11",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jabezwinston",
"github_project": "etplib-python",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "etplib"
}