# Agri-IoT-for-Africa
DHT22 Setup
sudo apt-get install git
DHT22 configuration steps
1.wget
github.com
2 unzip master.zip
3. cd Adafruit_Python_DHT-master
4. sudo apt-get update && sudo apt-get upgrade
5. sudo apt-get install build-essential python-dev
6. sudo python(3.7 or 2.7) setup.py install
7. cd examples/
8. vim simpletest.py (to write the event measurement codes)
9. python simpletest.py (to start measurement)
Server-client code link: Bluetooth Programming with Python 3 - Kevin Doran
Python Socket Programming - Server, Client Example - JournalDev
python3.7 -m pip install pybluez (Helps to define BLE package that calls the RFCOMM fxn)
sudo apt-get update && sudo apt-get upgrade
Create client-server or master-slave architecture using the code in the above link
Reinstalled Adafruit with 3.7 modules: sudo python(3.7 or 2.7) setup.py install
Develop code for BT comm. We had data type exception today to be corrected tomorrow: bad file descriptor
System response to external thresholds.
CH socket to accept multiple communication
Connected multiple SNs to the CH and transmitted sensory data packets from each SN. Cluster formation is possible in BLE.
To implement crontab: crontab -e
Assign period and task
Generate a database of periodic sensory data and save in .csv file
If s RPi is used as a BS, then the blueman library should be installed to communicate the crontab-scheduled data sample.
run-parts /etc/cron.daily for immediate testing of the cron
Using git clone and the git link, we pushed the code into github
Command: Git clone
github.com
git clone
github.com (it creates a clone repository from github to the local machine e.g. on the pi directory
cd agri-iot/ (to relocate to the locally cloned directory/repository)
Copy the server files into this local repository
git config --global user.email "you@example.com" (a …