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
+21-28Lines changed: 21 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,43 +50,25 @@ The first step to using this package is installing it on your system. The instal
50
50
51
51
### Python
52
52
53
-
The package is primarily installed using the `pip` command, downloading the package from the Python Index - "PyPi". Note - the below instructions outline installation an Linux-based (Raspberry Pi) system.
54
-
55
53
#### PyPi Installation
56
54
57
-
The SparkFun Qwiic Soil Moisture Sensor Python package is part of the overall SparkFun Qwiic Python package which is hosted on PyPi. On systems that support PyPi installation via pip, this library is installed using the following commands
55
+
The package is primarily installed using the `pip3` command, downloading the package from the Python Index - "PyPi".
58
56
59
-
For all users (note: the user must have sudo privileges):
60
-
```sh
61
-
sudo pip install sparkfun-qwiic
62
-
```
63
-
For the current user:
57
+
Note - the below instructions outline installation an Linux-based (Raspberry Pi) system.
64
58
59
+
First, setup a virtual environment from a specific directory using venv:
65
60
```sh
66
-
pip install sparkfun-qwiic
67
-
```
68
-
---
69
-
---
70
-
> [!CAUTION]
71
-
> **TODO** Put together how this works with the new virtual environments used with the latest Python install
72
-
---
73
-
---
74
-
#### Local Installation
75
-
To install, make sure the setuptools package is installed on the system.
76
-
77
-
Direct installation at the command line:
78
-
```sh
79
-
python setup.py install
61
+
python3 -m venv path/to/venv
80
62
```
63
+
You can pass any path as path/to/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).
81
64
82
-
To build a package for use with pip:
65
+
Next, install the qwiic package with:
83
66
```sh
84
-
python setup.py sdist
85
-
```
86
-
A package file is built and placed in a subdirectory called dist. This package file can be installed using pip.
If not already installed, follow the [instructions here](https://docs.circuitpython.org/projects/circup/en/latest/#installation) to install CircUp on your computer.
102
89
@@ -110,6 +97,12 @@ Finally, connect a device with CircuitPython installed to your computer and then
110
97
circup install --py qwiic_soil_moisture_sensor
111
98
```
112
99
100
+
If you would like to install any of the examples from this repository, issue the corresponding circup command from below. (NOTE: The below syntax assumes you are using CircUp on Windows. Linux and Mac will have different path seperators (i.e. "/" vs. "\"). See the [CircUp "example" command documentation](https://learn.adafruit.com/keep-your-circuitpython-libraries-on-devices-up-to-date-with-circup/example-command) for more information)
101
+
```sh
102
+
circup example qwiic_soil_moisture_sensor\Example1_GetReadings
103
+
circup example qwiic_soil_moisture_sensor\Example2_Change_I2C_Address
104
+
```
105
+
113
106
Example Use
114
107
---------------
115
108
Below is a quickstart program to print moisture level and toggle the LED on the Soil Moisture Sensor.
0 commit comments