Please help! Heltec CubeCell HTCC-AB01 with DS18B20 on TTN (LoRaWAN)

Hello Heltec Community,
I am looking for a working code for my Heltec CubeCell HTCC-AB01. I would like to get the temperature on TTN with a DS18B20 and my Heltec CubeCell HTCC-AB01, has anyone done anything for that?

Thanks in advance


We haven’t adapted this sensor yet.

you can refer this code:

1 Like

Hello jasonXu,
thank you for your answer.


and you can refer these talking:

1 Like

Hello, about the connection for a DS18B20 probe to a CubeCell HTCC-AB01, you need to develop your own function using GPIO control as this example which is in function with these devices :

/* Write function for only one byte on the OneWire bus. LSB transmitted first. /
for (mask = 00000001; mask>0; mask <<= 1) { //iterate through bit mask with byte mask = 1; /
Mesaures: Duration of slot one between two falling edge is 68 µs using parameters below. /
Duration of slot zero between two falling edge is 69,6 µs using parameters below. */
void WriteByte(uint8_t MyByte, Probe_t ProbeSelected) {
uint8_t mask = 0x01;
uint8_t k;
switch (ProbeSelected) {
case Probe1:
pinMode(DS18S20Pin_GPIO0, OUTPUT);
for (k = 0; k < 8; k++) {
digitalWrite(DS18S20Pin_GPIO0, LOW); // falling edge to start the Slot OneWire
if ((MyByte & mask) != 0) { // at initial time mask = 0x01
digitalWrite(DS18S20Pin_GPIO0, HIGH); // 7 µs measured
pinMode(DS18S20Pin_GPIO0, INPUT_PULLUP);
delayMicroseconds(20); // with the control of GPIO, the complete delay is 65 µs before the next falling edge
pinMode(DS18S20Pin_GPIO0, OUTPUT);
} else {
digitalWrite(DS18S20Pin_GPIO0, HIGH);
mask <<= 1; // mask = mask << 1;

Do not worry I send you the github URL link before the end of the week for a solution which is in use.

Hello, With delay i propose you a solution among several to retrieve the measure sended from a DS18B20 probe. First it is not possible to recognize the correct timing without an oscilloscope. I send you a link about a project which use DS18B20 probes connected on a CubeCell HTCC-AB01. The connection to the gateway is in OTAA mode and you will find functions which should answer maybe to your problem.

Best regards.