DS18B20_RT library and invalid conversion error

Hi everybody. I'm quite an occasional programmer so my question might be trivial but I cannot solve it on my own since couple hours.

I try to use the DS18B20 temperature sensor and I planned to use for it the DS18B20_RT library and OneWire library.
I do everything as on many examples/tutorials and I always get an error:

" invalid conversion from 'OneWire*' to 'uint8_t {aka unsigned char}' [-fpermissive]
DS18B20 sensor(&oneWire);"

the same happens when I try to compile the examples delivered with the DS18B20_RT library.

The problematic part of my code is located before void setup() {....
and looks like this:

// OneWire - Version: 2.3.6
#include <OneWire.h>

// DS18B20_RT - Version: Latest 
#include <DS18B20.h>

#include "thingProperties.h"


const int PumpPin = 2; // PIN pompy obiegowej SUMPA pin2 to D2
const byte SumpTempSensor_Pin = 3; // PIN czujnika temp SUMPA

OneWire oneWire(SumpTempSensor_Pin);
DS18B20 sensor(&oneWire);


void setup() {

The board is Arduino Nano RP2040 connect and I use Arduino Online Editor.
appreciate your help

and your error is : "invalid conversion from 'OneWire*' to 'uint8_t {aka unsigned char}'"
that means: oneWire definition is not specting a "byte" but a number.
you should try this.
#define SumpTempSensor_Pin 3
instead of
const byte SumpTempSensor_Pin = 3
hope this helps

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.