Node code for sx1272 LoRa transciever

Dependencies:   mbed BMP085 BufferedSerial DHT Sds021 Chainable_RGB_LED DigitDisplay LoRaWAN-lib SX1272Lib

Fork of LoRaWAN-demo-72-bootcamp by Semtech

Committer:
abouillot
Date:
Mon Jan 30 21:49:58 2017 +0000
Revision:
9:16106008960b
Parent:
1:263aa4ff29cd
Added support for BMP085, DHT22 and SDS021 sensors; Added support of update upon User Button push

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mluis 0:45496a70a8a5 1 /*
mluis 0:45496a70a8a5 2 / _____) _ | |
mluis 0:45496a70a8a5 3 ( (____ _____ ____ _| |_ _____ ____| |__
mluis 0:45496a70a8a5 4 \____ \| ___ | (_ _) ___ |/ ___) _ \
mluis 0:45496a70a8a5 5 _____) ) ____| | | || |_| ____( (___| | | |
mluis 0:45496a70a8a5 6 (______/|_____)_|_|_| \__)_____)\____)_| |_|
mluis 0:45496a70a8a5 7 (C)2015 Semtech
mluis 0:45496a70a8a5 8
mluis 0:45496a70a8a5 9 Description: Target board general functions implementation
mluis 0:45496a70a8a5 10
mluis 0:45496a70a8a5 11 License: Revised BSD License, see LICENSE.TXT file include in the project
mluis 0:45496a70a8a5 12
mluis 0:45496a70a8a5 13 Maintainer: Miguel Luis and Gregory Cristian
mluis 0:45496a70a8a5 14 */
mluis 0:45496a70a8a5 15 #ifndef __BOARD_H__
mluis 0:45496a70a8a5 16 #define __BOARD_H__
mluis 0:45496a70a8a5 17
mluis 0:45496a70a8a5 18 #include "mbed.h"
mluis 0:45496a70a8a5 19 #include "system/timer.h"
mluis 0:45496a70a8a5 20 #include "debug.h"
mluis 0:45496a70a8a5 21 #include "system/utilities.h"
mluis 0:45496a70a8a5 22 #include "sx1272-hal.h"
abouillot 9:16106008960b 23 #include "DHT.h"
abouillot 9:16106008960b 24 #include "BMP085.h"
abouillot 9:16106008960b 25 #include "Sds021.h"
mluis 0:45496a70a8a5 26
mluis 0:45496a70a8a5 27 #define USE_BAND_868
mluis 0:45496a70a8a5 28
mluis 1:263aa4ff29cd 29 extern SX1272MB2xAS Radio;
abouillot 9:16106008960b 30 //extern BMP085 *bmpSensor;
abouillot 9:16106008960b 31 //extern DHT *dhtSensor;
abouillot 9:16106008960b 32 //extern SDS021 *sdsSensor;
abouillot 9:16106008960b 33 extern BMP085 bmpSensor;
abouillot 9:16106008960b 34 extern DHT dhtSensor;
abouillot 9:16106008960b 35 extern SDS021 sdsSensor;
abouillot 9:16106008960b 36
mluis 0:45496a70a8a5 37
mluis 0:45496a70a8a5 38 /*!
mluis 0:45496a70a8a5 39 * \brief Initializes the target board peripherals.
mluis 0:45496a70a8a5 40 */
mluis 0:45496a70a8a5 41 void BoardInit( void );
mluis 0:45496a70a8a5 42
mluis 0:45496a70a8a5 43 /*!
mluis 0:45496a70a8a5 44 * \brief Measure the Battery level
mluis 0:45496a70a8a5 45 *
mluis 0:45496a70a8a5 46 * \retval value battery level ( 0: very low, 254: fully charged )
mluis 0:45496a70a8a5 47 */
mluis 0:45496a70a8a5 48 uint8_t BoardGetBatteryLevel( void );
mluis 0:45496a70a8a5 49
mluis 0:45496a70a8a5 50 #endif // __BOARD_H__