PDA

View Full Version : Cannot compile the one wire library with Teensy3.1



DD1965
12-20-2013, 06:48 AM
Hi,
it seems that the pin defintions are missing for __MK20DX256__ in onewire.h. I copied the __MK20DX128__ definations are renamed it and it now complies, however, I have no idea if I can use the exact same pin definitions for the onewire.h as per Teensy3.0. Can anybody help?
Cheers David D.

Nantonos
12-20-2013, 05:19 PM
I can't replicate that error. Arduino 1.0.5, Teensyduino 1.17 final, the DS18x20_Temperature example sketch compiles correctly with either Teensy 3.0 or Teensy 3.1.

Looking in OneWire.h I see

#elif defined(__MK20DX128__) || defined(__MK20DX256__)
which certainly looks like a 3.1 test.

Do you maybe have an older version of the onewire library inside sketches/libraries or somethiing like that?

DD1965
12-20-2013, 09:45 PM
I can't replicate that error. Arduino 1.0.5, Teensyduino 1.17 final, the DS18x20_Temperature example sketch compiles correctly with either Teensy 3.0 or Teensy 3.1.

Looking in OneWire.h I see

#elif defined(__MK20DX128__) || defined(__MK20DX256__)
which certainly looks like a 3.1 test.

Do you maybe have an older version of the onewire library inside sketches/libraries or somethiing like that?

Thanks for the reply, I down loaded 2.2 version separately of the one wire from the site and it does not have the || defined (__MK20DX256__) part. Does it come directly with the teensyduino 1.17 distribution? I run two versions of the arduino compiler and perhaps that's overriding it?
Cheers /David D

DD1965
12-20-2013, 10:17 PM
Thanks for the reply, I down loaded 2.2 version separately of the one wire from the site and it does not have the || defined (__MK20DX256__) part. Does it come directly with the teensyduino 1.17 distribution? I run two versions of the arduino compiler and perhaps that's overriding it?
Cheers /David D

I just checked and I have the 1.18 distribution which is a pre release (I think). Cheers /DD

DD1965
12-20-2013, 10:26 PM
I found the problem, it is pointing to the wrong library of the one wire. I have two versions of the arduino compiler installed a and I load that library as I changed the code to fix a bug with the Arduino Due. Thanks for the help! It now has the correct onewire header file. Cheers /DD