2
stars
0
forks
source link
MoistureSensingSprinkler
Steps to setup for Pi
- Setup NPM and web server + Mongodb.
- Install node
sudo apt-get install nodejs
- Install express
sudo npm install -g express
- Install global generator
sudo npm install -g express-generator
- Install requests for python
sudo apt-get install python-requests
- Clone repo
git clone https://github.com/joshbaird/MoistureSensingSprinkler.git
- Change directory to clone repo
cd MoistureSensingSprinkler
- Change directory to nodemoistureserver project folder
cd nodemoistureserver
- Install and start MongoDB duide for pi and a shortcut script to do this
- install dependencies
npm install
- Create data directory
mkdir data
- Start web server to test
npm start
- Browse to: http://localhost:3000
- Enable I2C on the pi.
- remove i2c from blacklist
sudo nano /etc/modprobe.d/raspi-blacklist.conf
- comment out the
blacklist i2c-bcm2708
line to #blacklist i2c-bcm2708
- Enable kernel i2C module
sudo nano /etc/modules
and add i2c-dev
to the end
- install additional packages,
sudo apt-get update
sudo apt-get install i2c-tools
, sudo apt-get install python-smbus
- add pi user to i2c group
sudo adduser pi i2c
- change baud to 1000-3000, start low and work up.
sudo modprobe i2c_bcm2708 baudrate=1000
- reboot pi...
- test with command
i2cdetect -y 0
, if that does not work try i2cdetect -y 1