Go Down

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

mitaccio

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?

johnwasser

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

mitaccio

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:
http://www.apress.com/9781430232407

Go Up