“a much more professional environment which is far more capable than the Arduino IDE”
Ok, interesting. First off I am the poor soul doing this Arduino stuff for CMWX1ZZABZ … I use emacs as text editor, gcc compiles on the command line too, gdb is in another xterm tab, and yes, I use openocd directly to flash/debug (did I mention that I use Linux ?). I do not use the Arduino IDE to develop, as it is too limiting, right ?
Not quite. Since I implemented the LoRaWAN class (LoRaWAN.h) I actually started to play more with LoRaWAN/TTN than all the time when I was working on StackForce’s LoRaMac-node code. Why ? Because the Arduino style of uttmost simplification allows you to play with a few lines of code.
Here a simple example for US915/TTN:
void setup( void )
{
LoRaWAN.begin(US915);
LoRaWAN.setSubBand(2);
LoRaWAN.joinOTAA(appEui, appKey, devEui);
}
void loop( void )
{
delay(10000);
if (!LoRaWAN.busy() && LoRaWAN.joined())
{
LoRaWAN.beginPacket();
LoRaWAN.write(0xef);
LoRaWAN.write(0xbe);
LoRaWAN.write(0xad);
LoRaWAN.write(0xde);
LoRaWAN.endPacket();
}
}
I am not saying that’s the best possible way, the best example or whatever. But reading the various threads here, the biggest problem folks have with nodes is to join a network at all. How many lines of code is the equivalent functionality with LMIC/LoRaMac-node ?
Ah, and if I wanted to get power consumption down to 2uA, I’d replace “delay(10000)” by “STM32L0.stop(10000)”. Done. Problem solved.
How much work do you have to invest with the more professional setup to get to the same point ?
Just found that myself a tad interesting, because yes, with a professional toolchain setup, you might have the ability to create more complex things (perhaps), but you pay a steep price.