Automated irrigation system drip and monitoring from node js with Raspberry Pi and Arduino.
- Raspberry Pi
- WiFi USB adapter
- Arduino
- Soil moisture sensor
- Solenoid
- Electric water pump
- Temperature sensor
- Nodejs
- Serial-port
The first thing we need to do is flash an Arduino board with the Firmata protocol. For this "project" we use a Standard Firmata.
In src/sketch.ino is the file ready for upload to the board. To archive this yo can use the ino command line tool.
Yo can installed with yum
or apt-get
.
$ sudo apt-get install arduino
The picocom
command line tool will helps us with serial communication.
$ sudo apt-get install picocom
Once you installed all the dependencies above, install ino
using pip
or easy_install
$ pip install ino
Edit the file ino.ini
with the specs of your board and the serial port.
[build]
board-model = mega2560
[upload]
board-model = mega2560
serial-port = /dev/ttyACM0
[serial]
serial-port = /dev/ttyACM0
Build the file in src/sketch.ino
$ ino build
Upload
$ ino upload
Connect the arduino then run:
$ node app.js
Create by Ivajo26