Transmitting from HTCC-AB02A to OLED Lora ESP32?

Hi, is there sample code for sending data from an HTCC-AB02A to OLED Lora ESP32? We’ve multiple CubeCells as sensors and one Lora ESP32 as a gateway. Thanks!


please refer this link:

cubecell use this code:

esp32 use this code:

I’m not suggesting that it’s a better solution that what’s been provided above, but you may be interested in the commentary and various modules I currently have, including the CubeCell, using LoRa to communicate with a WiFi LoRa 32 module configured as an MQTT gateway (LoRa Gateway).

Hi, I’m trying to use your code. The CubeCell code fails, it’s not able to find ADC_CTL. am i missing a library? Thanks!

Quite possibly. Are you using the [support] software versions noted on my web page:

One change that has occurred since I began working with the CubeCell is that there has been a significant upgrade of the Arduino IDE board hardware library. Earlier versions of the sketches provided below will not work with the latest revision of the Heltec CubeCell board software(1.2.0). Heltec also recommends upgrading to the latest version of the Arduino IDE(1.8.13 at the time of writing) before installing the latest board software (through the IDE Boards Manager).

The CubeCell sketches that can be downloaded just below this text should be OK with those versions of software.

If you downloaded the zipped ‘package’, you will need to be using an earlier version of the CubeCell hardware support library. You do need the ‘Langlo’ libraries from the zipped package, but they are just the local configuration stuff. I believe that the item you are missing is coming from the Heltec hardware support library and I know that I had a similar (if not the same) problem at one point and had to update my CubeCell software.

If the above doesn’t get you sorted, let me know what versions of the software you are using. I’m just about finished my current cycle of hardware development and was planning to get back to the software stuff in the near future anyway. If you still can’t get it sorted, I’ll do a fresh install and provide the details.

Well blow me down… I just tried to compile my sketch again, in the environment I’ve been using for ages, and the compilation fails with exactly the message you are seeing. It’s the definition for the pin that was used to control the measurement of the battery voltage, but I’ve no idea why it’s suddenly not there.

If you comment out the three lines of code that reference ADC_CTL the sketch will compile. I’ll look into this and see if I can work out what’s happened. That part of the sketch was just taken from a Heltec example, as I recall, and the compiled code is running quite happily on two CubeCell boards that I have running, so I don’t undertand why the definition for ADC_CTL has just suddenly disappeared.

Well, I still can’t explain why the ADC_CTL definition disappeared, but there’s a lengthy discussion on mesuring battery voltage here and in the course of that discussion (which spans the period when I ‘assembled’ the offending sketch) examples seem to shift from using specific references to ADC_CTL to simply reading the ADC (which is what you get when you comment out the lines of code recommended in my previous reply).

If you’re concerned about the accuracy of battery voltage measurements, I’d suggest following the above referenced thread. Either way, this aspect of the sketch has no impact on the LoRa side of things (which was my primary concern at the time).

yes, i removed the ADC_CTL lines too, a few days ago. however, i had to also create dummy turnOnRGB() and turnOffRGB() functions. did you have to mess with those?

any chance of putting your project on github? it’s the only clear one that shows interoperability between a heltec cubecell and heltec esp32 lora.


The RGB functions changed in the later versions fo the hardware support software, but all of that seems to be OK if you use the latest versions of all the necessary software. In the earlier versions, the call was simply RGB_ON(x,y), while in the current version it’s turnOnRGB(x,y). If you’re not finding the turnOnRGB() function, are you sure you’re using the latest version of the hardware support software? (I set up a fresh install this morning to test all this and had to download the GIT version, which Heltec seems to recommend in any case, and turnOnRGB() seems to be there).

And yes, I will get the whole thing up on github but I didn’t want to do that until I was comfortable that everything was working [at least nearly] as intended. That has been dependent on my finalising the hardware side of things. That’s almost done, so I will get it there soon… But for the time being, anyone accessing the material from my website will at least be aware of the ‘state of play’ (i.e. it’s still a ‘work in progress’).