CubeCell-Arduino icon indicating copy to clipboard operation
CubeCell-Arduino copied to clipboard

LoRa and display APIs (and likely others) unnecessarily incompatible with ESP32-based boards?

Open Patronics opened this issue 4 years ago • 1 comments

I was initially using a Wifi LoRa 32 V2 board for a project, before deciding to switch to the Cubecell GPS module instead, as GPS is more valuable to the project. I expected it to be a close-to-drop-in replacement, however the code seems to be closely related, yet inexplicably quite different, making transitioning between modules harder than it needs to be.

For example, why do ESP32 boards use the sytax Heltec.display->init(); Heltec.display->clear(); etc, while the Cubecell boards use display.init(); display.clear(); for the same purpose?

And similarly, why is the LoRa setup so different between them, with ESP32 able to use LoRa.beginPacket(); LoRa.print("message"); LoRa.endPacket();, while Cubecell needs Radio.Send( (uint8_t *)"message", strlen("message") );?

Is there any reason these APIs are so different and incompatible, or any plans to unify them for more consistency and usability between your products?

Patronics avatar Jul 15 '20 23:07 Patronics

Hello Patronics,

the core problem is that ASR650x-Arduino is just using the arduino editor, and not really Arduino compatible. I really don't know why they use a wrapper around the U8g2 by oliver insted of writing a really Arduino compatible framework and than just using olivers library. Then, you could easily port the code from ASR6501 to ESP32 or STM32 or AVR.

HelTec, please consider this. I'm writing a Transport for the MySensors library on the CubeCell, and this incompatibilities are a PITA. Regards, Edi

eiten avatar Jul 29 '20 20:07 eiten