Skip to content

Commit e410140

Browse files
committed
2 parents bc75c0c + 6e19dc3 commit e410140

File tree

1 file changed

+12
-37
lines changed

1 file changed

+12
-37
lines changed

README.md

Lines changed: 12 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ Qwiic_Soil_Moisture_Sensor_Py
77
</p>
88
<p align="center">
99
<a href="https://pypi.org/project/sparkfun-qwiic-soil-moisture-sensor/" alt="Package">
10-
<img src="https://img.shields.io/pypi/pyversions/sparkfun_qwiic_ccs811.svg" /></a>
11-
<a href="https://github.com/sparkfun/Zio-Qwiic-Soil-Moisture-Sensor/issues" alt="Issues">
10+
<img src="https://img.shields.io/pypi/pyversions/sparkfun_qwiic_soil_moisture_sensor.svg" /></a>
11+
<a href="https://github.com/sparkfun/Qwiic_Soil_Moisture_Sensor_Py/issues" alt="Issues">
1212
<img src="https://img.shields.io/github/issues/sparkfun/Qwiic_Soil_Moisture_Sensor_Py.svg" /></a>
13-
<a href="https://qwiic-ccs811-py.readthedocs.io/en/latest/?" alt="Documentation">
14-
<img src="https://readthedocs.org/projects/qwiic-ccs811-py/badge/?version=latest&style=flat" /></a>
15-
<a href="https://github.com/sparkfun/Zio-Qwiic-Soil-Moisture-Sensor/blob/master/LICENSE" alt="License">
13+
<a href="https://qwiic-soil-moisture-sensor-py.readthedocs.io/en/latest/?" alt="Documentation">
14+
<img src="https://readthedocs.org/projects/qwiic-soil-moisture-sensor-py/badge/?version=latest&style=flat" /></a>
15+
<a href="https://github.com/sparkfun/Qwiic_Soil_Moisture_Sensor_Py/blob/master/LICENSE" alt="License">
1616
<img src="https://img.shields.io/badge/license-MIT-blue.svg" /></a>
1717
<a href="https://twitter.com/intent/follow?screen_name=sparkfun">
1818
<img src="https://img.shields.io/twitter/follow/sparkfun.svg?style=social&logo=twitter"
@@ -31,9 +31,6 @@ This package can be used in conjunction with the overall [SparkFun qwiic Python
3131

3232
New to qwiic? Take a look at the entire [SparkFun qwiic ecosystem](https://www.sparkfun.com/qwiic).
3333

34-
### :warning: **Using this sensor on a Raspberry Pi**? :warning:
35-
Your system might need modification. See this [note](#raspberry-pi-use).
36-
3734
## Contents
3835

3936
* [Supported Platforms](#supported-platforms)
@@ -66,12 +63,12 @@ This repository is hosted on PyPi as the [sparkfun-qwiic-soil-moisture-sensor](h
6663

6764
For all users (note: the user must have sudo privileges):
6865
```sh
69-
sudo pip install sparkfun-qwiic-soil_moisture_sensor
66+
sudo pip install sparkfun-qwiic-soil-moisture-sensor
7067
```
7168
For the current user:
7269

7370
```sh
74-
pip install sparkfun-qwiic-soil_moisture_sensor
71+
pip install sparkfun-qwiic-soil-moisture-sensor
7572
```
7673
To install, make sure the setuptools package is installed on the system.
7774

@@ -87,39 +84,17 @@ python setup.py sdist
8784
A package file is built and placed in a subdirectory called dist. This package file can be installed using pip.
8885
```sh
8986
cd dist
90-
pip install sparkfun_qwiic_soil_moisture_sensor-<version>.tar.gz
87+
pip install sparkfun-qwiic-soil-moisture-sensor-<version>.tar.gz
9188
```
9289

93-
Raspberry Pi Use
94-
-------------------
95-
For this sensor to work on the Raspberry Pi, I2C clock stretching must be enabled.
96-
97-
To do this:
98-
- Login as root to the target Raspberry Pi
99-
- Open the file /boot/config.txt in your favorite editor (vi, nano ...etc)
100-
- Scroll down until the block that contains the following is found:
101-
```ini
102-
dtparam=i2c_arm=on
103-
dtparam=i2s=on
104-
dtparam=spi=on
105-
```
106-
- Add the following line:
107-
```ini
108-
# Enable I2C clock stretching
109-
dtparam=i2c_arm_baudrate=10000
110-
```
111-
- Save the file
112-
- Reboot the raspberry pi
113-
11490
Example Use
11591
-------------
11692
See the examples directory for more detailed use examples.
11793

11894
```python
11995
from __future__ import print_function
12096
import qwiic_soil_moisture_sensor
121-
import time
122-
import sys
97+
12398

12499
def runExample():
125100

@@ -136,11 +111,11 @@ def runExample():
136111
print("Initialized.")
137112

138113
while True:
139-
mySoilSensor.read_results()
114+
mySoilSensor.read_moisture_level()
140115
print (mySoilSensor.level)
141-
mySoilSensor.LEDon()
116+
mySoilSensor.led_on()
142117
time.sleep(1)
143-
mySoilSensor.LEDoff()
118+
mySoilSensor.led_off()
144119
time.sleep(1)
145120

146121
if __name__ == '__main__':

0 commit comments

Comments
 (0)