CubeCell: OneWire Library

I’m looking to use the OneWire library, so I can use a DS18B20 sensor with the CubeCell board. There are a couple of issues for compiling:
First one is WProgram.h is missing (Ok, someone suggested replacing that with arduino.h)
If I do that, then pins_arduino.h is missing. I’m used to using the pins_ .h file to see what pins are available, but I cannot find this file for the cubecell. Is there a pin definition somewhere?

1 Like


just added the OneWire library to my fork
it compiles but i cannot test because i have no sensors


do i just need to replace the core directory with yours? I dont get my sketch compiling with oneWire.h included.

The failure message would be helpfull.

I get a sensor next week and will genug.
But please post failure message when you get an Error.

Hello rsmedia!
I have replaced all files in “… AppData\Local\Arduino15\packages\CubeCell\hardware\CubeCell\0.0.3” with your files. I also trying to get the DS18B20 work

The error message:
Arduino: 1.8.10 (Windows 10), Board: “CubeCell-Board, REGION_EU868, CLASS_A, DEACTIVE”

Multiple libraries were found for “LoRaWan_APP.h”
Used: C:…\AppData\Local\Arduino15\packages\CubeCell\hardware\CubeCell\0.0.3\libraries\LoRa
Multiple libraries were found for “OneWire.h”
Used: F:\Seafile\Prog\Arduino\libraries\OneWire
Not used: C:…\AppData\Local\Arduino15\packages\CubeCell\hardware\CubeCell\0.0.3\libraries\OneWire
In file included from F:\Seafile\Prog\Arduino\Git\cubecell_lora\cubecell_lorawan_v1\cubecell_lorawan_v1.ino:4:0:

F:\Seafile\Prog\Arduino\libraries\OneWire/OneWire.h:15:52: fatal error: WProgram.h: No such file or directory

compilation terminated.

exit status 1
Error compiling for board CubeCell-Board.

You must have a old Version.
In the actual Version There is no reference to WProgram.h anymore

You were right. Had an older version, now it works. Thanks!!

It doesn’t work yet.

my OneWire Sensor is still on its way.
Hope to get it this week.

It work works? Or it compiles? I am still not managing to get a reading from my sensor

My ds18b20 has arrived.
I hole i can find the time this week to test and make a working library

Do you have a 4.7k resistor between the Data and vcc pin as pullup?

Yea, but no response from the chip. Same circuit (and components) on an ESP32 and an Uno, works fine

i have the same problem.
i am sorry but i had no time yet to dig deeper.
I2C sensors are higher on priority for me right now.

if i find time i will see what i can do.

start sequence from the Cube to the DS18B20 is good, getting the initial low, followed by the DS’s reply of a low pulse again,but when it comes to sending F0 to get the DS’s address, there is no further responses

Anyone had any further joy with OneWire/DS18B20 sensors and CubeCell? I’ve not had any joy my end.

Had no time but it is in my Agenda for the next 2 weeks.
Have you Only tried the existing library or tried to make changes to it?

Both, I also made my own “library” from scratch, that just did the first initialisation for the chips, and then called the search command (F0? I think it was…). Initialisation looked good, but when I called F0, there was no response from the chip. I suspect the board is holding the pin high, stronger than the 4.7k resistor, and not letting the chip pull it wherever it wants.
Response from an Uno:

Response from the CubeCell:
The Uno’s is a lot more noisy… Any I’m not sure whether the timing is actually different… It shouldn’t be!

If you can send me your “library” i will have a look.