Go Down

Topic: Noob having issue with 1 Wire (Read 1 time) previous topic - next topic


I am completely new to Arduinos and programming.  I have 2 Dallas 1 Wire sensors set up correctly and am trying to enter the coding but getting errors.  I have oneWire.h and DallasTemperature.h loaded and am using the sketch from Michael McRoberts Beginning Arduino but get errors all over the place.  Things not defined, etc.  I am using Arduino 1.0 on an UNO.  Any help on a copy and paste sketch that works on finding the addresses for my sensors and returning a temp?


Has the library been updated to work with Arduino 1.0?  Check with the author.
Send Bitcoin tips to: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp


I got the library from http://www.pjrc.com/teensy/td_libs_OneWire.html and can't tell if it is updated for the Arduino 1.0

I get the following errors

DallasOneWire2Sensor.cpp:3:21: error: OneWire.h: No such file or directory
In file included from DallasOneWire2Sensor.cpp:4:
C:\Users\User\Downloads\Arduino\arduino-1.0\libraries\DallasTemperature/DallasTemperature.h:62: error: expected `)' before '*' token
C:\Users\User\Downloads\Arduino\arduino-1.0\libraries\DallasTemperature/DallasTemperature.h:195: error: ISO C++ forbids declaration of 'OneWire' with no type
C:\Users\User\Downloads\Arduino\arduino-1.0\libraries\DallasTemperature/DallasTemperature.h:195: error: expected ';' before '*' token
DallasOneWire2Sensor:10: error: 'temperature' does not name a type
DallasOneWire2Sensor:14: error: 'oneWire' was not declared in this scope

This is from the code taken off of this site:

Go Up