This example shows how display the Firmware version.
Required Materials
1 x Waspmote
1 x Battery
1 x LoRaWAN EU or LoRaWAN IN or LoRaWAN ASIA-PAC / LATAM module
1 x 868 MHz Antenna (for EU and IN bands) or 900 MHz Antenna (for AU, US, AS and KR bands)
Notes
- This example can be executed in Waspmote v12 and Waspmote v15
/* * ------ LoRaWAN Code Example -------- * * Explanation: This example shows how display the Firmware version * * Copyright (C) 2022 Libelium Comunicaciones Distribuidas S.L. * http://www.libelium.com * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * * Version: 3.0 * Implementation: Yuri Carmona */#include<WaspLoRaWAN_Global.h>//////////////////////////////////////////////uint8_t socket = SOCKET0;//////////////////////////////////////////////// variableuint8_t error;voidsetup() {USB.ON();USB.println(F("LoRaWAN example - Firmware version")); ////////////////////////////////////////////// // 1. switch on ////////////////////////////////////////////// error =LoRaWAN.ON(socket); // Check statusif( error ==0 ) {USB.println(F("Switch ON OK")); }else {USB.print(F("Switch ON error = ")); USB.println(error, DEC); } ////////////////////////////////////////////// // 2. show firmware version //////////////////////////////////////////////LoRaWAN.showFirmwareVersion();}voidloop() {}