-
Notifications
You must be signed in to change notification settings - Fork 6
Compost Tea Brewer
jamesH edited this page Sep 13, 2017
·
13 revisions
This is the project page for the compost tea brewer.
$ git clone https://github.com/CommonGarden/Grow.js.git
$ cd Grow.js
$ npm install
$ cd Grow.js/examples/rasp-pi
$ sudo nano bioreactor.js
/* [edits:]
// - specific pin names/connections
// - uuid//token
// - host IP
*/
//to start device driver
$ sudo node bioreactor.js
//optional way to start #1
$ sudo npm install pm2 -g
$ sudo pm2 start bioreactor.js
//optional way to start #2
$ sudo npm install forever -g
$ sudo forever start bioreactor.js
https://www.npmjs.com/package/forever
Code from [old] tea brewer/worm bin monitor arduino sketch:
/* PINS:
// A0=TEMT6000
// A1=Sharp
// A2=eTape-signal
// A3=eTape-ref
// D2=inner-DHT11
// D3=outer-DHT11
// D4=brew-tank-DS
// D5=worm-bin-DS
// D6=heater-relay1
// D7=airlift-relay2
// D8=aerator-relay3
// D9=output-relay4
*/
//#include <dht11.h>
//#define DHT1_PIN 2 //inner (bottom bin) DHT
//#define DHT2_PIN 3 //outer (ambient air) DHT
#include <OneWire.h>
#define DS1_PIN 4 //brewer tank DS (water temp)
//#define DS2_PIN 5 //worm bin DS
//#define ambi1_PIN A0 //TEMT6000 sensor
//#define ambi2_PIN A1 //Sharp sensor
#define relay1_PIN 6 //relay for water heater
#define relay2_PIN 7 //relay for primary airlift pump
#define relay3_PIN 8 //relay for secondary air pump
#define relay4_PIN 9 //relay for output/sensor/recirc pump
// initialize the relay pins as an output:
pinMode(relay1_PIN, OUTPUT);
pinMode(relay2_PIN, OUTPUT);
pinMode(relay3_PIN, OUTPUT);
pinMode(relay4_PIN, OUTPUT);
//setup for ywrobot "inverted" open-collector relay boards
digitalWrite(relay1_PIN,HIGH);
digitalWrite(relay2_PIN,HIGH);
digitalWrite(relay3_PIN,HIGH);
digitalWrite(relay4_PIN,HIGH);