Pages: [1]   Go Down
Author Topic: Noob having issue with 1 Wire  (Read 881 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 34
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 178
Posts: 8061
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Has the library been updated to work with Arduino 1.0?  Check with the author.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Newbie
*
Karma: 0
Posts: 34
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Pages: [1]   Go Up
Jump to: