Skip to content

Commit d7c7e25

Browse files
Update READMEs
1 parent 03c3c65 commit d7c7e25

File tree

2 files changed

+23
-41
lines changed

2 files changed

+23
-41
lines changed

README.md

+17-40
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ New to qwiic? Take a look at the entire [SparkFun qwiic ecosystem](https://www.s
3131
* [Supported Platforms](#supported-platforms)
3232
* [Structure](#structure)
3333
* [Dependent Modules](#dependent-modules)
34+
* [MicroPython and CircuitPython](#micropython-and-circuitpython)
3435
* [Checkout Commands](#checkout-commands)
3536
* [Installation](#installation)
3637
* [Documentation](#documentation)
@@ -75,6 +76,10 @@ Qwiic_Py/
7576
7677
```
7778

79+
Micropython and CircuitPython
80+
------------------
81+
The drivers in the [drivers directory](https://github.com/sparkfun/Qwiic_Py/tree/master/qwiic/drivers) are supported on Linux, MicroPython and CircuitPython. The drivers in the [drivers_linux_only directory](https://github.com/sparkfun/Qwiic_Py/tree/master/qwiic/drivers_linux_only) are currently only supported for Linux. To learn more about MicroPython and CircuitPython, and for install instructions for your specific driver, see the README file of each supported driver.
82+
7883
Dependencies
7984
-------------
8085
The qwiic package depends on the qwiic I2C driver:
@@ -102,55 +107,27 @@ git clone --recurse-submodules https://github.com/sparkfun/Qwiic_Py.git
102107
Installation
103108
-------------
104109
### PyPi Installation
105-
This repository is hosted on PyPi as the [sparkfun-qwiic](https://pypi.org/project/sparkfun-qwiic/) package. On systems that support PyPi installation via pip, this package is installed using the following commands
106-
For all users (note: the user must have sudo privileges):
107-
```sh
108-
sudo pip install sparkfun-qwiic
109-
```
110-
For the current user:
111-
```sh
112-
pip install sparkfun-qwiic
113-
```
110+
This repository is hosted on PyPi as the [sparkfun-qwiic](https://pypi.org/project/sparkfun-qwiic/) package.
114111

115-
This process will also install all modules the qwiic package requires for operation, including the needed qwiic driver packages.
116-
### Local Installation
117-
To install, make sure the setuptools package is installed on the system.
112+
Note - the below instructions outline installation on a Linux-based (Raspberry Pi) system and will install all the drivers in this package. **To install for MicroPython or CircuitPython, see the instructions in each driver's README.**
118113

119-
Direct installation at the command line:
114+
First, setup a virtual environment from a specific directory using venv:
120115
```sh
121-
python setup.py install
116+
python3 -m venv ~/sparkfun_venv
122117
```
123118

124-
To build a package for use with pip:
119+
You can pass any path instead of ~/sparkfun_venv, just make sure you use the same one for all future steps. For more information on venv [click here](https://docs.python.org/3/library/venv.html).
120+
121+
Next, install the qwiic package with:
125122
```sh
126-
python setup.py sdist
127-
```
128-
A package file is built and placed in a subdirectory called dist. This package file can be installed using pip.
123+
~/sparkfun_venv/bin/pip3 install sparkfun-qwiic
124+
```
125+
Now you should be able to run any example or custom python scripts that have `import qwiic` by running e.g.:
129126
```sh
130-
cd dist
131-
pip install sparkfun_qwiic_-<version>.tar.gz
127+
~/sparkfun_venv/bin/python3 example_script.py
132128
```
133129

134-
135-
<!--
136-
Example Use
137-
--------------
138-
```python
139-
import qwiic
140-
141-
results = qwiic.list_devices()
142-
143-
print(results)
144-
>> [(61, 'Qwiic Micro OLED', 'QwiicMicroOled'), (91, 'Qwiic CCS811', 'QwiicCcs811'),
145-
>> (96, 'Qwiic Proximity Sensor', 'QwiicProximity'), (119, 'Qwiic BME280', 'QwiicBme280')]
146-
147-
# Create a Micro OLED driver object using the I2C address of the board.
148-
mydevice = qwiic.create_device(results[0][0])
149-
150-
print(mydevice)
151-
>> <qwiic_micro_oled.qwiic_micro_oled.QwiicMicroOled object at 0x751fdab0>
152-
```
153-
-->
130+
This process will install all drivers and modules the qwiic package requires for operation. If you are only working with one driver, it is recommended to download that driver directly (see instructions in each driver's README) rather than from this large meta-package.
154131

155132
<p align="center">
156133
<img src="https://cdn.sparkfun.com/assets/custom_pages/3/3/4/dark-logo-red-flame.png" alt="SparkFun - Start Something">

README.txt

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
This README pertains to the CircuitPython bundle generated by the SparkFun Qwiic_Py repository.
22

3+
README.txt is a required file for Circup/CircuitPython bundle generation.
34

4-
TODO: flesh out circuitpython details
5+
To add the bundle to your computer, execute "circup bundle-add sparkfun/Qwiic_Py".
6+
7+
Afterwards, to install individual drivers from the bundle to a device, execute "circup install --py <your_driver_name>".
8+
9+
See the README for each supported driver for more information.

0 commit comments

Comments
 (0)