dallas temp and onewire

Hey guys,

I try to make a simple temperature sensor and I use this guide (which worked for me on another pc)

Even though now I installed the onewire and dalas temp libraries but I still cant get this work.

Here is the error

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
Arduino: 1.0.6 (Windows 7), Board: "Arduino Uno"
C:\Users\Miltos\Documents\Arduino\libraries\OneWire\OneWire.cpp:85:24: error: WConstants.h: No such file or directory
C:\Users\Miltos\Documents\Arduino\libraries\OneWire\OneWire.cpp: In constructor 'OneWire::OneWire(uint8_t)':
C:\Users\Miltos\Documents\Arduino\libraries\OneWire\OneWire.cpp:93: error: 'digitalPinToBitMask' was not declared in this scope
C:\Users\Miltos\Documents\Arduino\libraries\OneWire\OneWire.cpp:94: error: 'digitalPinToPort' was not declared in this scope
C:\Users\Miltos\Documents\Arduino\libraries\OneWire\OneWire.cpp:94: error: 'portInputRegister' was not declared in this scope
C:\Users\Miltos\Documents\Arduino\libraries\OneWire\OneWire.cpp: In member function 'uint8_t OneWire::reset()':
C:\Users\Miltos\Documents\Arduino\libraries\OneWire\OneWire.cpp:127: error: 'delayMicroseconds' was not declared in this scope
C:\Users\Miltos\Documents\Arduino\libraries\OneWire\OneWire.cpp:134: error: 'delayMicroseconds' was not declared in this scope
C:\Users\Miltos\Documents\Arduino\libraries\OneWire\OneWire.cpp: In member function 'void OneWire::write_bit(uint8_t)':
C:\Users\Miltos\Documents\Arduino\libraries\OneWire\OneWire.cpp:157: error: 'delayMicroseconds' was not declared in this scope
C:\Users\Miltos\Documents\Arduino\libraries\OneWire\OneWire.cpp:165: error: 'delayMicroseconds' was not declared in this scope
C:\Users\Miltos\Documents\Arduino\libraries\OneWire\OneWire.cpp: In member function 'uint8_t OneWire::read_bit()':
C:\Users\Miltos\Documents\Arduino\libraries\OneWire\OneWire.cpp:185: error: 'delayMicroseconds' was not declared in this scope

http://www.hobbytronics.co.uk/ds18b20-arduino

and thats the guide I used...thanks in advance.

I think the errors pretty much told you what the problem is, don't you?

looks like I miss a lib right? but I add them.... :confused:

restart the ide, and check if it's installed in the menu.

its not solved....maybe I need to add the lib again? or maybe ? I need to use a different source of lib?

Your OneWire sure don't look like my OneWire.

so...can I have yours? any link to get it? :slight_smile:

google my friend.

I was not aware that there are more than one onewire lib, and if so, Googling is not a good way solve the problem.

While very much doubt that the library is the problem, try here

http://www.hacktronics.com/Tutorials/arduino-1-wire-tutorial.html

which has links to libraries that work - onewire and DallasTemperature.

Place the libraries in the same folder as all the other libraries, and restart the IDE. You need to do this so that IDE knows the new libraries are there.

Here's an idea !

Look at the first error message, first. You are missing WConstants.h

Which probably means that some of your code includes the old "#include Wprogram.h" instead of "#include Arduino.h", which replaced it about 4 years ago.

A good idea....

I have never heard of WConstants and assumed it was something hidden in a library. Sounds like even more reason to get something decent from Hacktronics, who appear to take some trouble to be up-to-date...