Onewire compile error ?

Hello,

My setup:

Win 8.1 Home.
Arduino IDE 1.16.12 (fresh install)
Arduino UNO R3

I get the following error when trying to compile a small test program:

C:\Documents and Settings\lab1\My Documents\Arduino\libraries\OneWire-master\OneWire.cpp: In static member function ‘static uint16_t OneWire::crc16(const uint8_t*, uint16_t, uint16_t)’:

C:\Documents and Settings\lab1\My Documents\Arduino\libraries\OneWire-master\OneWire.cpp:571:42: error: ‘_crc16_update’ was not declared in this scope

crc = _crc16_update(crc, input*);*

  • ^*
    exit status 1
    Error compiling for board Arduino/Genuino Uno.
    ```
    *#include <VirtualWire.h>
    #include <OneWire.h>
    #include <DallasTemperature.h>

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}*
```
Any hints ?
regards,
Nils

The address of the library is meaningless but it should be OK if all the other libraries are there. Did you restart the Arduino IDE after you installed the OneWire library? You need to do this so that the IDE knows where it is.

Post a link to where you downloaded the OneWire library from. Please use the chain links icon on the toolbar to make the URL clickable when you post a link.

Is that the full error or just what appeared at the bottom of the console output? To easily get the full output when you encounter an error you'll see a button on the right side of the orange bar "Copy error messages". Click that button. Paste the error in a message here using code tags.

Hi,

I downgraded the Arduino IDE to version 1.6.0 and 1.6.5 and now the test compiles without errors.
It looks like the newer versions have some issues ?

Thanks for responding !

Nils

nilses:
It looks like the newer versions have some issues ?

probably not but, by doing that, I guess you did re-start the iDE after you installed the library, thereby solving the problem.

nilses:
It looks like the newer versions have some issues ?

There was a big change in the Arduino IDE in 1.6.6. This did break some code but we have worked to minimize this as much as possible in recent versions and update code to work with new IDE versions. You were using an outdated IDE version so it's possible the problem had been fixed in 1.8.2. It's also possible that a problem with the OneWire library has been fixed but you're using an outdated version of the library. I would have been happy to look into this but you won't post a link to where you got the library so I guess you'll just have to be satisfied with being stuck using an old version of the Arduino IDE.

Nick_Pyner:
probably not but, by doing that, I guess you did re-start the iDE after you installed the library, thereby solving the problem.

Since Arduino IDE 1.6.6 that's no longer necessary, it scans the library folders on every compile. But it's a good tip for nilses now since they will be using an obsolete IDE version for the foreseeable future.

Hi,
Thanks for all tips and hints.

I have just installed Windows 10 Pro with Arduino IDE 1.8.2 and will do some more testing on this new laptop.
New libraries are downloaded from Github, always checking the date stamp on some of the files.
Some of the files are just a few days or weeks old so I feel pretty sure they are the "latest".

I have been playing around with Arduino and Teensy for some 5 years so I'm used to restart the IDE after new libraries are installed.

Next weekend I will upgrade all my systems to IDE 1.8.2. 10 in total, many running in Virtual Box.

The Rasberry PI's have to wait a little more...

regards,

Nils

Hello,

I have exactly same problem. I use same library, maybe other version and from other source but same and I have same wrong. If I use just dallastemperature library and one wire library all is OK. If I use just virtualwire library, all is again ok, but if I use all library together I have the problem which is note up.
I have IDE 1.8.1
Do anybody know the solve??

thank you very much.

Hello, Paul here… the guy who makes Teensy and also happens to maintain OneWire.

I tried to investigate this problem. But as you can see here, it compiles without any error.

I tested with Arduino 1.8.3 and Arduino Uno selected, using VirtualWire 1.27, OneWire 2.3.3, and DallasTemperature 3.7.6.