Commit graph

8 commits

Author SHA1 Message Date
Frank Leon Rose
d74f8cd660 Conditionally compile regional code in examples 2016-06-27 23:29:08 -04:00
Matthijs Kooijman
1b796c178d Add example sketch for LoRaWAN
This sketch is aimed at The Things Network, but it should work for other
networks as well. It employs personalization, over-the-air activation
has not been tested yet.
2016-02-20 12:31:28 +01:00
Matthijs Kooijman
29bfb8d504 Improve raw.ino example
This:
 - Removes support for the Pinoccio Scout RGB led and just uses a single
   led (using LED_BUILTIN) on all boards.
 - Fixes some indentation.
 - Uses a constant for the TX interval, and increases it to comply with
   the duty cycle limits.
 - Uses more explicit radio settings, instead of referring to the "ping"
   settings defined by LMIC.
 - Uses os_runloop_once() instead of os_runloop(), so the example can be
   more easily modified to do other things in addition to radio RX and
   TX.
 - Shows how to use LMIC_UNUSED_PIN for unused pins.
2016-02-20 12:31:28 +01:00
Matthijs Kooijman
4bbc25e3b5 Rename pin map to lmic_pins and make it const
This should decrease the likelyhood of a naming conflict, and making it
const might help the compiler optimize.

In the future, configuring pins might change to use some initialization
function to pass the pin mapping, but for now this approach seems simple
and efficient.
2016-02-20 12:24:04 +01:00
Matthijs Kooijman
db786f367f Allow disabling I/Q inversion on RX
By uncommenting a maco in config.h, this inversion is enabled, and
communication between nodes can be enabled. This should be used just for
debugging, though.
2016-02-20 12:24:04 +01:00
Matthijs Kooijman
4d85c3ccf0 Add some comments to examples 2015-09-07 09:51:54 +02:00
Matthijs Kooijman
fd3a39b464 Update raw example
By setting some more parameters (frequency, txpower), RX and TX now work
properly. Whenever a packet is received, reception is now restarted.

It now also updates leds to indicate reception status. The led is red (on
Pinoccio, or off for normal Arduino boards) when no packet was received
in 2500ms, green (or off) when there was. Whenever a packet is received, the LED
very briefly blinks to indicate this.

Packets are sent about once every second. When a packet is received, the
next TX is rescheduled to prevent TX collisions (in a very basic way).
2015-03-24 14:08:17 +01:00
Matthijs Kooijman
a414ba9948 Add minimal example for raw TX/RX
This example sends and receives data directly, without any of the
LoRaWAN protocol overhead.

This code does not seem to work yet.
2015-03-23 20:38:40 +01:00