A Client module for Agrothon
Project description
Installation
-
First Install the dependencies
sudo apt-get update sudo apt-get install python3-opencv python3-rpi.gpio
-
from Pypi
pip3 install AgroClient
-
From git
pip3 install -U git+https://github.com/viswanathbalusu/Agrothon-Client
Usage
usage: AgroClient [-h] -y HOSTNAME -a APIKEY [-u USB] [-p1 PIR1] [-p2 PIR2]
[-p3 PIR3] [-p4 PIR4] [-br BAUDRATE] [-r RELAY]
optional arguments:
-h, --help, show this help message and exit
-y, --hostname HOSTNAME, API Server host name
-a, --apikey APIKEY, API Key of host
-u, --usb USB, USB Port of Arduino
-p1, --pir1 PIR1, GPIO Pin of PIR1
-p2, --pir2 PIR2, GPIO Pin of PIR2
-p3, --pir3 PIR3, GPIO Pin of PIR3
-p4, --pir4 PIR4, GPIO Pin of PIR4
-br, --baudrate BAUDRATE, Baud rate of USB Port to read sensor data
-r, --relay RELAY, Relay Signalling GPIO pin
Circuit Diagram
Hardware
Pin Configuration (Default)
-
Raspberry Pi
GPIO Device Use Mode 12
Relay To Switch on/off Relay OUT 25
PIR1 Motion Detection IN 8
PIR2 Motion Detection IN 7
PIR3 Motion Detection IN 1
PIR3 Motion Detection IN -
Arduino nano
Pin Device Device pin Mode A0
Moisture Sensor* Analog Out IN D12
DHT11 Signal IN * For multiple sensors use differnet Analog pins
-
Connect the Pi camera to CSI Port
-
Use SSH to access the terminal and run the Python Code
-
Connect all the
Vdd's
andGND's
to 5V and GND (or as per instructions given in spec sheet)
Note
-
To get the USB Device ID, Use
ls /dev/tty*
Most Probably the Value will be
/dev/ttyUSB0
-
Sensor data should be sent in the following pattern
mositure1,moisture2,moisture3, .... ,moistureN, Temperature,Humidity ex : 55.29,52.59,32.5,65.26
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
AgroClient-1.0.6.tar.gz
(4.7 kB
view hashes)
Built Distribution
AgroClient-1.0.6-py3-none-any.whl
(17.9 kB
view hashes)
Close
Hashes for AgroClient-1.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a61ee1232fc6f5a5f030dd39e8564b71983a457fc266402eb507b097d4741f6 |
|
MD5 | 8e28cd6dd3a3f32b48a49e99a519b801 |
|
BLAKE2b-256 | 633a5dcf7ccb42f8237eab1dfc2930c01375d5d72cbbc691ae37a5a14aade9c9 |