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
board.cpp
00001 /* 00002 / _____) _ | | 00003 ( (____ _____ ____ _| |_ _____ ____| |__ 00004 \____ \| ___ | (_ _) ___ |/ ___) _ \ 00005 _____) ) ____| | | || |_| ____( (___| | | | 00006 (______/|_____)_|_|_| \__)_____)\____)_| |_| 00007 (C)2015 Semtech 00008 00009 Description: Target board general functions implementation 00010 00011 License: Revised BSD License, see LICENSE.TXT file include in the project 00012 00013 Maintainer: Miguel Luis and Gregory Cristian 00014 */ 00015 #include "mbed.h" 00016 #include "board.h" 00017 00018 SX1272MB2xAS Radio( NULL ); 00019 00020 /*! 00021 * BMP085 object to read presure and temperature 00022 */ 00023 //I2C i2c(D14, D15); 00024 BMP085 bmpSensor(D14, D15, BMP085_MODE_HIGH_RESOLUTION); 00025 //BMP085 bmpsensor(i2c, BMP085_MODE_HIGH_RESOLUTION); 00026 //BMP085 *bmpSensor; 00027 00028 /*! 00029 * DHT object to read humidity and temperature 00030 */ 00031 DHT dhtSensor(D7, 22); 00032 //DHT *dhtSensor; 00033 00034 SDS021 sdsSensor(PC_10, PC_11); 00035 //SDS021 *sdsSensor; 00036 00037 void BoardInit( void ) 00038 { 00039 // TimerTimeCounterInit( ); 00040 // sdsSensor = new SDS021(PC_10, PC_11); 00041 // dhtSensor = new DHT(D7, 22); 00042 // bmpSensor = new BMP085(D14, D15); 00043 } 00044 00045 uint8_t BoardGetBatteryLevel( void ) 00046 { 00047 return 0xFE; 00048 }
Generated on Tue Jul 12 2022 21:57:19 by 1.7.2