No, the one that I have is not the Adafrruit one, I just could not find the one I had in the fritzing parts. Here is the barometric sensor that I bought: Amazon.com
That bmp.getEvent(&event); is the exact line of code that stops the webpage from even loading.
The temperature sensor that looks like a transistor on the breadboard, yes, is a TMP36. It closely parallels the temperature reading of the temperature probe, but maybe I will look into getting a DS18B20 as a better replacement.
The water temperature probe that I have already has a header on it to change from pullup or pulldown resistor. It communicates over the OneWire and DallasTemperature library.
I will change the resistor and wiring for the DHT sensor. I will use 4.7K to 5V.
I haven't had a problem with the flow sensors yet...but if I do I will try to find I2C versions.
Thank you for catching my mistake on the LED. DOH! I have a 470R with my led on my actual breadboard.
I am sorry I just realized that I posted my old version of the code before. My mistake. Here is the code that is the most updated:
//libraries
#include <SPI.h>
#include <Ethernet.h>
#include <dht.h>
#include <Wire.h>
#include <BMP180.h>
#include <OneWire.h>
#include <DallasTemperature.h>
//ethernet
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };// mac address
byte ip[] = { 10, 0, 0, 60 }; // IP address in LAN
byte gateway[] = { 10, 0, 0, 1 }; // internet access via router
byte subnet[] = { 255, 255, 255, 0 }; //subnet mask
EthernetServer server(80);
//strings
String readString;
//integers
int ledPin = 5;
int flowPin0 = 2;
int flowPin1 = 3;
volatile int count0;
volatile int count1;
const int temperaturePin = A0;
//definitions
#define DHT11_PIN A1
#define ONE_WIRE_BUS 4
dht DHT;
//conversions
float hum;
float Celcius = 0;
float Fahrenheit = 0;
double flowRate0;
double flowRate1;
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
void setup() {
pinMode(ledPin, OUTPUT); //pin selected to control
pinMode(flowPin0, INPUT);
pinMode(flowPin1, INPUT);
digitalWrite(ledPin, HIGH);
delay(500);
digitalWrite(ledPin, LOW);
Ethernet.begin(mac, ip, gateway, subnet);
server.begin();
sensors.begin();
attachInterrupt(0, Flow0, RISING);
attachInterrupt(1, Flow1, RISING);
}
void Flow0(){
count0++;
}
void Flow1(){
count1++;
}
void loop() {
//Air Temperature Sensor
int reading = analogRead(temperaturePin);
float voltage = reading * 5.0;
voltage /= 1024.0;
float temperatureC = (voltage - 0.5) * 100;
float temperatureF = (temperatureC * 9.0 / 5.0) + 32.0;
//Humidity Sensor
int chk = DHT.read11(DHT11_PIN);
hum = DHT.humidity;
//Water Temperature Sensor
sensors.requestTemperatures();
Celcius = sensors.getTempCByIndex(0);
Fahrenheit = sensors.toFahrenheit(Celcius);
//FlowRate Valves
count0 = 0;
count1 = 0;
interrupts();
delay(1000);
noInterrupts();
flowRate0 = (count0 * 3.05);
flowRate0 = flowRate0 * 60;
flowRate0 = flowRate0 / 1000;
flowRate1 = (count1 * 3.05);
flowRate1 = flowRate1 * 60;
flowRate1 = flowRate1 / 1000;
//Barometric Pressure Sensor
EthernetClient client = server.available();
if (client) {
while (client.connected()) {
if (client.available()) {
char c = client.read();
//read char by char HTTP request
if (readString.length() < 100) {
//store characters to string
readString += c;
}
//if HTTP request has ended– 0x0D is Carriage Return \n ASCII
if (c == 0x0D) {
client.println("HTTP/1.1 200 OK"); //send new page
client.println("Content-Type: text/html");
client.println();
client.println("<HTML>");
client.println("<HEAD>");
client.println("<TITLE> Greenhouse Monitor</TITLE>");
client.println("<meta http-equiv=refresh content=5>");
client.println("</HEAD>");
client.println("<BODY bgcolor=#000000>");
client.println("<H1 style=\"color:Green;\">Shenango Greenhouse Monitor</H1>");
client.println("<hr>");
client.println("
");
client.println("<H1 style=\"color:Green;\">Grow Lights:</H1>");
client.println("<H3><a href=\"/?GROWON\"\">Turn On Growlights</a>
</H2>");
client.println("<H3><a href=\"/?GROWOFF\"\">Turn Off Growlights</a>
</H2>");
client.println("<H1 style=\"color:Green;\">Air Temperature:</H1>");
client.println("<H3 style=\"color:White;\">");
client.println(temperatureC);
client.println("C");
client.println("
");
client.println(temperatureF);
client.println("F");
client.println("</H3>");
client.println("<H1 style=\"color:Green;\">Relative Humidity:</H1>");
client.println("<H3 style=\"color:White;\">");
client.println(hum);
client.println("%");
client.println("</H3>");
client.println("<H1 style=\"color:Green;\">Barometric Pressure:</H1>");
client.println("<H3 style=\"color:White;\">");
client.println();
client.println(" InHg");
client.println("</H3>");
client.println("<H1 style=\"color:Green;\">Water Temperature:</H1>");
client.println("<H3 style=\"color:White;\">");
client.println(Celcius);
client.println("C");
client.println("
");
client.println(Fahrenheit);
client.println("F");
client.println("</H3>");
client.println("<H1 style=\"color:Green;\">Water Acidity:</H1>");
client.println("<H3 style=\"color:White;\">");
client.println();
client.println(" pH");
client.println("</H3>");
client.println("<H1 style=\"color:Green;\">Flow Valve 1:</H1>");
client.println("<H3 style=\"color:White;\">");
client.println(flowRate0);
client.println(" L/Min");
client.println("</H3>");
client.println("<H1 style=\"color:Green;\">Flow Valve 2:</H1>");
client.println("<H3 style=\"color:White;\">");
client.println(flowRate1);
client.println(" L/Min");
client.println("
");
client.println("</H3>");
client.println("</BODY>");
client.println("</HTML>");
delay(10);
client.stop();
// control grow lights
if (readString.indexOf("?GROWON") > -1){
digitalWrite(ledPin, HIGH);
}
else {
if (readString.indexOf("?GROWOFF") > -1){
digitalWrite(ledPin, LOW);
}
}
//clearing string for next read
readString = "";
}
}
}
}
}
It does not have any of the barometric stuff in it yet.
I have attached an image of the verbose output after I uploaded the code to the Uno. It is named Verbose Output.png. I have also added an updated image of my wiring diagram.