From 732c6ff58c76946807bc5159dc3708881eba0429 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?= Date: Wed, 27 Dec 2017 18:13:12 +0100 Subject: [PATCH] added readme --- README.md | 30 ++++++++++++++++++++++++++++-- main.py | 1 - 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2c22f21..bf27d82 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,28 @@ -# GEX-Client-Py -Python client for GEX. / W.I.P. / Bugs abundant +# Python client for GEX + +This is the primary GEX front-end for user scripting. + +GEX configuration can be persisted on-chip or loaded dynamically using +the client from a INI file or string. + +A sample GEX script could look like this: + +```python + +#!/bin/env python3 +import time +import gex + +client = gex.Client() + +led = gex.Pin(client, 'LED') + +for i in range(0,10): + led.toggle() + time.sleep(.1) + +``` + +The client instance can be used to send control commands directly, bypassing the unit drivers. +Writing new unit drivers is simple and straightforward. See any of the existing units for reference. + diff --git a/main.py b/main.py index 8298047..f31052b 100644 --- a/main.py +++ b/main.py @@ -1,6 +1,5 @@ #!/bin/env python3 import time - import gex client = gex.Client()