Closed dterweij closed 6 years ago
just go to your oneWire library to OneWire\OneWire.cpp and change the line 569 from
#if defined(__AVR__)
to
#if 0
don't know what the problem is, your arduino-software seems to have lost the
#include <util/crc16.h>
do you use a standard arduino?
Which version of Arduino are you using, and which board is selected in Tools > Boards? What program are you compiling?
I tried just now with Arduino 1.8.3, Arduino Uno, and the OneWire DS18x20_Temperature example. It compiles without any error.
You must give us all the info needed to reproduce this error. If none of the examples provided by these libs give the error, you need to post a complete program, where complete means it can be copied into Arduino and the error reproduced by clicking Verify.
Without this info, this issue will be closed....
I tried again just now, using Arduino 1.8.3 and Arduino Uno, with all 3 libraries as mentioned on the forum. It compiles without any error.
I tested with VirtualWire 1.27, OneWire 2.3.3, and DallasTemperature 3.7.6.
Here is a screenshot of the successful compile:
Updated to Arduino IDE 1.8.3. I have the same versions. Boards used: Arduino Uno v3 (Original) and the chinese clone (with ch341 windows driver). Boardmanager is Arduino/Genuino uno I have 3 of them currently connected. com port 4, 7 and 3.
I shall do the change mentioned by @orgua
@dterweij so the problem persists with the software-update? very odd! Maybe some of your self-installed libs in ./documents/arduino/libraries is causing some problems. who knows. but my bugfix should work because it will switch out this missing routine with a slower routine provided in the onewire-lib-sources.
It compiles now @orgua. I am going to finish the sketch in the weekend. I expect it works fine. I am closing the issue. Thank you all.
You just needed to downgrade OneWire library version. Worked like a charm for me with 2.3.0
Just a quick shoutout. Had the exact same problem when using onewire 2.3.6 in VScode with platformIO on Teensy 2.0 (teensy lib 4.15.0) board. When using 2.3.2 of onewire it compiled.
Solved: Since I had some time today I came back to the issue and found the solution here: https://forum.pjrc.com/threads/57527-Platform-IO-Configuration?p=275844&viewfull=1#post275844
The problem is that when using certain frameworks there are multiple versions of crc16.h and the wrong one might be included. In my case I was searching for crc16.h in my platformio/packages folder and sure enough there were two. The teensy one from paul and one in the virtualwire library. So everything compiles as intended when following the advice to add the following to platformio.ini:
lib_ignore =
VirtualWire
Sketch Compile Error:
Using: Arduino IDE 1.8.2 (Win10)
Libraries:
Same issue found here, but not a answer how to resolve: https://forum.arduino.cc/index.php?topic=470991.0
Goal: Send/Receive temperature (and other data in the future) over a 433Mhz transmitter/receiver.