light sensor
Dependencies: X_NUCLEO_IKS01A1 LoRaWAN-lib SX1276Lib mbed
Fork of LoRaWAN-SX1276-Application-Demo by
Revision 1:80c1daf19aa4, committed 2016-08-26
- Comitter:
- ubhat
- Date:
- Fri Aug 26 20:51:07 2016 +0000
- Parent:
- 0:42863a11464a
- Child:
- 2:78df92a365c2
- Commit message:
- Push Button Example (PORT 11)
Changed in this revision
--- a/app/Config.h Fri Aug 26 19:36:35 2016 +0000 +++ b/app/Config.h Fri Aug 26 20:51:07 2016 +0000 @@ -63,7 +63,7 @@ /*! * LoRaWAN application port */ -#define LORAWAN_APP_PORT 5 +#define LORAWAN_APP_PORT 11 /*! * LoRaWAN User defined Tx Power
--- a/app/LoRaEventProc.cpp Fri Aug 26 19:36:35 2016 +0000 +++ b/app/LoRaEventProc.cpp Fri Aug 26 20:51:07 2016 +0000 @@ -190,11 +190,10 @@ Send Packet Immedietly if PC0 = GND */ case 11: - { - /* + { volatile bool PushButtonStatus; - PushButtonStatus = PC0; + PushButtonStatus = UsrButton; if(PushButtonStatus == 0) { @@ -207,7 +206,7 @@ // Keep polling IsTxIntUpdate = true; } - */ + break; }
--- a/app/main.cpp Fri Aug 26 19:36:35 2016 +0000 +++ b/app/main.cpp Fri Aug 26 20:51:07 2016 +0000 @@ -122,7 +122,7 @@ DeviceState = DEVICE_STATE_INIT; while( 1 ) - { + { if( IsNetworkJoinedStatusUpdate == true ) { IsNetworkJoinedStatusUpdate = false;
--- a/board/board.cpp Fri Aug 26 19:36:35 2016 +0000 +++ b/board/board.cpp Fri Aug 26 20:51:07 2016 +0000 @@ -23,6 +23,8 @@ DigitalOut Pc7( PC_7 ); DigitalIn Pc1( PC_1 ); +DigitalIn UsrButton(PC_13 ); + #define AIN_VREF 3.3 // STM32 internal refernce #define AIN_VBAT_DIV 2 // Resistor divider @@ -33,7 +35,6 @@ TimerTimeCounterInit( ); } - uint8_t BoardGetBatteryLevel( void ) { return 0xFE;
--- a/board/board.h Fri Aug 26 19:36:35 2016 +0000 +++ b/board/board.h Fri Aug 26 20:51:07 2016 +0000 @@ -33,6 +33,8 @@ extern SX1276MB1xAS Radio; +extern DigitalIn UsrButton; + typedef enum { MOTE_VERSION_NONE = 0,