I am a complete noob to this,i am using arduino 023 and getting the erros below , the sketch is in the attatchment, the lib path is C:\Users\FS\Documents\Arduino\libraries ,i was given the sketch, but i cannot get it to verify . This might be a stupid question, i am lost ,and just about to give up
I want to read the temps outside air temp, outside water temp, inside temp and humidity, then log it to the web
This sketch shows how to log data from a DHT11 and DS18B20 sensor to an SD card using the SD library.
The data from the sensors is updated every 10 seconds and written to the SD card in a CSV file.
Time stamp is taken from a DS1307 RTC. The data of the DHT22, DS18B20 and RTC is also available on a webserver.
The time of the DS1307 RTC is synced with a timeserver once a day. (DS1307 is not accurate over a long time.)
sketch_jul07a.cpp:17:17: error: dht.h: No such file or directory
sketch_jul07a:34: error: 'dht' does not name a type
sketch_jul07a.cpp: In function 'void setup()':
sketch_jul07a:67: error: 'class RTC_DS1307' has no member named 'isrunning'
sketch_jul07a.cpp: In function 'void loop()':
sketch_jul07a:91: error: 'DHT' was not declared in this scope
sketch_jul07a:151: error: 'DHT' was not declared in this scope
sketch_jul07a:259: error: 'DHT' was not declared in this scope
#include <SPI.h> #include <Ethernet.h> #include <Wire.h> #include "RTClib.h" This lib has quotes why is that #include <dht.h> #include <SD.h> #include <OneWire.h> #include <DallasTemperature.h> #include <LiquidCrystal_I2C.h> #include <Udp.h>
Things are getting better , i have a new set of errors now , RTC.isrunning is missing i think , do i need an older version of RTClib to run with IDE 023
paul1jul16ab.cpp: In function 'void setup()':
paul1jul16ab:69: error: 'class RTC_DS1307' has no member named 'isrunning'
paul1jul16ab.cpp: In function 'void loop()':
paul1jul16ab:93: error: expected primary-expression before '.' token
paul1jul16ab:112: error: expected primary-expression before 'float'
paul1jul16ab:112: error: expected )' before 'float' paul1jul16ab:153: error: expected primary-expression before '.' token paul1jul16ab:156: error: expected primary-expression before '.' token paul1jul16ab:261: error: expected primary-expression before 'float' paul1jul16ab:261: error: expected )' before 'float'
paul1jul16ab:264: error: expected primary-expression before 'float'
paul1jul16ab:264: error: expected `)' before 'float'
client.print(DHT.temperature());
client.println("
");
client.print("Humidity (%): "); //This may have to be: client.print("Humidity (%%): "); // as the percent sign is special
client.print(DHT.humidity());
if i comment out this line // if (! RTC.isrunning()) { i only get these errors, if this helps
tom1jul16ab:74: error: expected constructor, destructor, or type conversion before '(' token
tom1jul16ab:75: error: expected constructor, destructor, or type conversion before '.' token
tom1jul16ab:76: error: expected constructor, destructor, or type conversion before '(' token
tom1jul16ab:79: error: expected unqualified-id before 'if'
tom1jul16ab:84: error: expected constructor, destructor, or type conversion before '.' token
tom1jul16ab:85: error: expected declaration before '}' token
If statements have an open bracket and a close bracket.
if (! RTC.isrunning()) { //If you commented out this one......
Serial.println("RTC is NOT running!");
RTC.adjust(DateTime(__DATE__, __TIME__));
} // Then you need to comment out this one aswell.....
Or, better still:
/* if (! RTC.isrunning()) {
Serial.println("RTC is NOT running!");
RTC.adjust(DateTime(__DATE__, __TIME__));
} */ //This is a special comment. Anything between the /* and the */ will be commented out.