You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-40
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,7 @@ New to qwiic? Take a look at the entire [SparkFun qwiic ecosystem](https://www.s
31
31
*[Supported Platforms](#supported-platforms)
32
32
*[Structure](#structure)
33
33
*[Dependent Modules](#dependent-modules)
34
+
*[MicroPython and CircuitPython](#micropython-and-circuitpython)
34
35
*[Checkout Commands](#checkout-commands)
35
36
*[Installation](#installation)
36
37
*[Documentation](#documentation)
@@ -75,6 +76,10 @@ Qwiic_Py/
75
76
76
77
```
77
78
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
+
78
83
Dependencies
79
84
-------------
80
85
The qwiic package depends on the qwiic I2C driver:
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.
114
111
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.**
118
113
119
-
Direct installation at the command line:
114
+
First, setup a virtual environment from a specific directory using venv:
120
115
```sh
121
-
python setup.py install
116
+
python3 -m venv ~/sparkfun_venv
122
117
```
123
118
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:
125
122
```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.:
# 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.
0 commit comments