Compilation error with Onewire and Digispark Tiny 85 board and Platform.IO

Hi,

I facing the same error like discussed here https://forum.arduino.cc/index.php?topic=470991.0 but with Platform.IO.
Does anybody perhaps know how to solve this? In the post only a downgrade to an older Arduino GUI solved the issue and I did not find anything else.

Cheers,
Nils

C:\Users\nrott.platformio\packages\framework-arduino-avr-digistump\cores\dtiny/pins_arduino.h:81:93: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
#define portInputRegister(P) ( (volatile uint8_t )( pgm_read_byte( port_to_input_PGM + (P))) )
^
C:\Users\nrott.platformio\lib\OneWire\util/OneWire_direct_gpio.h:13:42: note: in expansion of macro 'portInputRegister'
#define PIN_TO_BASEREG(pin) (portInputRegister(digitalPinToPort(pin)))
^
C:\Users\nrott.platformio\lib\OneWire\OneWire.cpp:151:12: note: in expansion of macro 'PIN_TO_BASEREG'
baseReg = PIN_TO_BASEREG(pin);
^
C:\Users\nrott.platformio\lib\OneWire\OneWire.cpp: In static member function 'static uint16_t OneWire::crc16(const uint8_t
, uint16_t, uint16_t)':
C:\Users\nrott.platformio\lib\OneWire\OneWire.cpp:554:42: error: '_crc16_update' was not declared in this scope
crc = _crc16_update(crc, input*);*

  • ^*
    *** [.pio\build\digispark-tiny\lib03a\OneWire\OneWire.cpp.o] Error 1

That first set of messages is a warning, not an error.

The error is "OneWire.cpp:554:42: error: '_crc16_update' was not declared in this scope". The OneWire library is using a function that is supposed to be part of the AVR standard libraries. I don't know what part of the library you are missing because you are using the Arduino IDE or an Arduino board.

My guess is you are trying to talk to a DS18B20 using one wire.

The last byte received from the sensor is the CRC of the first 9 bytes. You can presumably just skip the CRC check part. Or you can replace the crc16 function with your own. There's a lot of example code online.