longfi-arduino/ST-B-L072Z-LRWAN1/longfi-us915-cayenne-sensor/README.md

3.1 KiB

ST B-L072Z-LRWAN1 - Cayenne Example

This example demonstrates sending motion and environmental sensor data in CayenneLPP format, using a B-L072Z-LRWAN1 development board with a X-NUCLEO-IKS01A3 expansion shield, to the myDevices Cayenne dashboard. For more information on adding your device to the Helium network, visit our quickstart guide here. For more information on adding your device to myDevices Cayenne, visit our guide here.

Required Arduino Libraries

From the Arduino IDE, open the Library Manager (Sketch->Include Library->Manage Libraries). In the search box, type the library name below and install the latest version.

MCCI Arduino LoRaWAN Library
CayenneLPP
X-NUCLEO-IKS01A3

Required Arduino Board Support

B-L072Z-LRWAN1 - ST STM32L0 Discovery kit

Install board support package, find instructions here.

Arduino IDE:

  1. Select Tools -> Board: -> Discovery
  2. Select Tools -> Board part number: -> Discovery L072Z-LRWAN1

Required Hardware

B-L072Z-LRWAN1 - ST STM32L0 Discovery kit

B-L072Z-LRWAN1 Product Page
B-L072Z-LRWAN1 User Manual

X-NUCLEO-IKS01A3 - ST Motion MEMS and Environmental Sensor Board

X-NUCLEO-IKS01A3 Product Page
X-NUCLEO-IKS01A3 User Manual

Programming (Uploading Method):

STM32CubeProgrammer(SWD)

Will use onboard ST-Link(Flasher/Debugger) to upload sketch.
Download and Install required utility from ST here.

Arduino IDE:
Select Tools -> Upload Method -> STM32CubeProgrammer(SWD)

PlatformIO Support

The PlatformIO Board file for this board is currently using the incorrect OpenOCD (Upload/Debug) script for the microcontroller on this board. We are in the process of pushing a fix upstream. When uploading or debugging, hold the reset button down right until the upload or debug process initiates it's routine in communicating with the board, this seems to aleviate the issue for right now.

platformio.ini

[env:disco_l072cz_lrwan1]
platform = ststm32
board = disco_l072cz_lrwan1
framework = arduino

lib_deps =
     STM32duino LSM6DSO
     STM32duino LIS2DW12
     STM32duino STTS751
     STM32duino LIS2MDL
     STM32duino LPS22HH
     STM32duino HTS221
     MCCI LoRaWAN LMIC library
     CayenneLPP