HelTecAutomation / CubeCell-Arduino

Heltec CubeCell Series (based on ASR6501, ASR6502 chip) Arduino support.
251 stars 138 forks source link

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

Open Patronics opened 4 years ago

Patronics commented 4 years ago

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?

eiten commented 4 years ago

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