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 #include "mbed.h"
mluis 0:45496a70a8a5 16 #include "board.h"
mluis 0:45496a70a8a5 17
mluis 1:263aa4ff29cd 18 SX1272MB2xAS Radio( NULL );
mluis 0:45496a70a8a5 19
abouillot 9:16106008960b 20 /*!
abouillot 9:16106008960b 21 * BMP085 object to read presure and temperature
abouillot 9:16106008960b 22 */
abouillot 9:16106008960b 23 //I2C i2c(D14, D15);
abouillot 9:16106008960b 24 BMP085 bmpSensor(D14, D15, BMP085_MODE_HIGH_RESOLUTION);
abouillot 9:16106008960b 25 //BMP085 bmpsensor(i2c, BMP085_MODE_HIGH_RESOLUTION);
abouillot 9:16106008960b 26 //BMP085 *bmpSensor;
abouillot 9:16106008960b 27
abouillot 9:16106008960b 28 /*!
abouillot 9:16106008960b 29 * DHT object to read humidity and temperature
abouillot 9:16106008960b 30 */
abouillot 9:16106008960b 31 DHT dhtSensor(D7, 22);
abouillot 9:16106008960b 32 //DHT *dhtSensor;
abouillot 9:16106008960b 33
abouillot 9:16106008960b 34 SDS021 sdsSensor(PC_10, PC_11);
abouillot 9:16106008960b 35 //SDS021 *sdsSensor;
abouillot 9:16106008960b 36
mluis 0:45496a70a8a5 37 void BoardInit( void )
mluis 0:45496a70a8a5 38 {
abouillot 9:16106008960b 39 // TimerTimeCounterInit( );
abouillot 9:16106008960b 40 // sdsSensor = new SDS021(PC_10, PC_11);
abouillot 9:16106008960b 41 // dhtSensor = new DHT(D7, 22);
abouillot 9:16106008960b 42 // bmpSensor = new BMP085(D14, D15);
mluis 0:45496a70a8a5 43 }
mluis 0:45496a70a8a5 44
mluis 0:45496a70a8a5 45 uint8_t BoardGetBatteryLevel( void )
mluis 0:45496a70a8a5 46 {
mluis 0:45496a70a8a5 47 return 0xFE;
mluis 0:45496a70a8a5 48 }