application layer with: button, LED, pot, tempSense

Dependencies:   mbed SX1272Lib

Fork of LoRaWAN-demo-72-bootcamp by Semtech

Use with sx1272 shield with grove peripherals connected:

D8 D9: ButtonRX TXA3 A4: TempSense
D6 D7:SCL SDA : LEDA1 A2: Pot

Button

Sends to different payloads: short press (under 1 sec)
long press: held down > 1 sec.

serial console keys

115200bps, 8N1
Enter key not used
Keys '0' to '3': cayenne channel number
'0': pot (rotary sensor)
'1': temperature
' 2': digital out
'3': analog out

Committer:
dudmuck
Date:
Tue Jan 30 22:49:12 2018 +0000
Revision:
10:52810ecbd83b
Parent:
9:0083afd69815
application layer with: button, LED, pot, tempSense

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"
mluis 0:45496a70a8a5 23
dudmuck 10:52810ecbd83b 24 //#define USE_BAND_868
dudmuck 10:52810ecbd83b 25 #define USE_BAND_915_HYBRID
mluis 0:45496a70a8a5 26
mluis 1:263aa4ff29cd 27 extern SX1272MB2xAS Radio;
mluis 0:45496a70a8a5 28
mluis 0:45496a70a8a5 29 /*!
mluis 9:0083afd69815 30 * \brief Disable interrupts
mluis 9:0083afd69815 31 *
mluis 9:0083afd69815 32 * \remark IRQ nesting is managed
mluis 9:0083afd69815 33 */
mluis 9:0083afd69815 34 void BoardDisableIrq( void );
mluis 9:0083afd69815 35
mluis 9:0083afd69815 36 /*!
mluis 9:0083afd69815 37 * \brief Enable interrupts
mluis 9:0083afd69815 38 *
mluis 9:0083afd69815 39 * \remark IRQ nesting is managed
mluis 9:0083afd69815 40 */
mluis 9:0083afd69815 41 void BoardEnableIrq( void );
mluis 9:0083afd69815 42
mluis 9:0083afd69815 43 /*!
mluis 0:45496a70a8a5 44 * \brief Initializes the target board peripherals.
mluis 0:45496a70a8a5 45 */
mluis 0:45496a70a8a5 46 void BoardInit( void );
mluis 0:45496a70a8a5 47
mluis 0:45496a70a8a5 48 /*!
mluis 0:45496a70a8a5 49 * \brief Measure the Battery level
mluis 0:45496a70a8a5 50 *
mluis 0:45496a70a8a5 51 * \retval value battery level ( 0: very low, 254: fully charged )
mluis 0:45496a70a8a5 52 */
mluis 0:45496a70a8a5 53 uint8_t BoardGetBatteryLevel( void );
mluis 0:45496a70a8a5 54
mluis 0:45496a70a8a5 55 #endif // __BOARD_H__