An API to facilitate interaction with an agriculture tech sensor kit.
Project description
An API to facilitate interaction with an agriculture tech sensor kit. The sensor kit contains the following hardware modules in addition to the Raspberry Pi Zero W:
Quectel L70-M39 GPS
Adafruit MCP3008 ADC
Seeed Studio 10102008 Moisture Sensor
Adafruit TCS34725 Light Sensor
Licensing
Free software: GNU General Public License v3
Features
Sensor reading
GPS
Moisture
Lux
Creating sensor profiles
Logging data to text files
Sending configuration commands GPS
Setup
Ensure SPI, I2C and UART are enabled on the Raspberry Pi. This can be done using the sudo raspi-config command in the Linux terminal.
Install required packages. These can be done as follows:
pip3 install Adafruit_GPIO Adafruit_MCP3008 Adafruit-Blinka
pip3 install file-read-backwards requests pynmea2
pip3 install RPi.GPIO adafruit-circuitpython-tcs34725
pip3 install agro-kit
Note that this API can has to be used on a Raspberry Pi.
Hardware Configuration
Pin numbers according to datasheets are shown in []
Adafruit TCS34735 -> Raspberry Pi
VDD [1] -> GPIO-17 [11]
GND [2] -> GND
SDA [3] -> SDA1_I2C [3]
SCL [4] -> SCL1_I2C [5]
Seeed Studio -> Raspberry Pi
[3] -> GPIO23 [16]
[4] -> GND
MCP3008 -> Seed Studio
CHO 0 [1] -> [1]
MCP3008 -> Raspberry Pi
GND [9] -> GND
CS [10] -> GPIO_SPI_CE0 [24]
D-IN [11] -> GPIO_SPI_MOSI [19]
D-OUT [12] -> GPIO_SPI_MISO [21]
CLK [13] -> GPIO_SPI_CLK [23]
GND [14] -> GND
VREF [15] -> 3.3 V [17]
VDD [16] -> 3.3 V [17]
QUECTEL L70-M39
TXD [2] -> GPIO_15_UART_RXD [10]
RXD [3] -> GPIO_14_UART_TXD [8]
VCC [8] -> 3.3 V [1]
GND [1] -> GND
About
The library includes 4 main classes: MoistureSensor, light_sensor, GPS and AgroKit.
The AgroKit is an aggregated class built with attributes of the other sensor classes
The AgroKit class can use any instance method available in the other sensor classes as well as its own aggregated methods
Link to documentation
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
The pynmea2 python library was used for GPS parsing of NMEA 0183 messages.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file agro_kit-1.0.2.tar.gz
.
File metadata
- Download URL: agro_kit-1.0.2.tar.gz
- Upload date:
- Size: 14.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.22.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e15f2c782346f328bd1217c88e99e8ac5ee1d7f5d237df104589a93bd6f07bf |
|
MD5 | 487de8214b510d9fa5fdd7c7dd7f901a |
|
BLAKE2b-256 | ed48b0b7f96eb53fdf56027c2d7797dd1b7c0a5d74cdb07fd1028c68b4b740e8 |
File details
Details for the file agro_kit-1.0.2-py2.py3-none-any.whl
.
File metadata
- Download URL: agro_kit-1.0.2-py2.py3-none-any.whl
- Upload date:
- Size: 14.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.22.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 230f93fbfa4504a947a78e80690256c2489d96aecc35915793e5e5524995e76e |
|
MD5 | 71beb6014a31871d059ba48ea937716c |
|
BLAKE2b-256 | efa0fdac23e5179026ebea32d048d2ec511a505db72f3ca0c64d85d28077b313 |