• by

LMIC means LoRaWAN-MAC-in-C and the most popular is the arduino-lmic library, the problem is the library is a little low level and for noobs is a little confusing to work with.

One solution is to use the arduino-lorawan library that uses the main arduino-lmic and provides a higher level, more Arduino-like wrapper which may be useful. But it is not noob friendly.

That’s the idea of the SimpleLMIC library, which uses the same arduino-lmic library behind but cut some corners and make it easy to connect to the TTN.

#include <SimpleLMIC.h>

const char *devAddr = "11111111";
const char *nwkSKey = "11111111111111111111111111111111";
const char *appSKey = "11111111111111111111111111111111";

const lmic_pinmap lmic_pins = {
  .nss = SS,
  .rxtx = LMIC_UNUSED_PIN,
  .dio = {DIO0, DIO1, LMIC_UNUSED_PIN}

SimpleLMIC ttn;

void setup() {
  ttn.personalize(devAddr, nwkSKey, appSKey);

void loop() {
  if (!ttn.isBusy())
    Serial.println("Not Busy!");
    ttn.print("Hello World");

void message(uint8_t *payload, size_t size, uint8_t port)
  Serial.println("Received " + String(size) + " bytes on port " + String(port));
  switch (port) {
    case 1:

This example show the ABP connection using the credential of the TTN network. Of course, you need to select yours and change the SS, DIO0, and DIO1 of your board.

The library is in work progress, but the main code already works.

If you want to use this library with some Arduino board, be award it uses a lot of memory and it should not possible to make work.

See yaa!