Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed LoRaWAN-lib SX1276Lib
Diff: app/main.cpp
- Revision:
- 12:497383202228
- Parent:
- 11:876331d64e0e
- Child:
- 13:7c3f8a6bad36
--- a/app/main.cpp Mon Dec 31 04:11:05 2018 +0000 +++ b/app/main.cpp Fri Mar 22 16:50:10 2019 +0000 @@ -216,9 +216,16 @@ // Application Globals -DigitalOut myled(D6); +/*BLUE and green led pin? +D7 == Green +D8 == Blue +Pelase proceed + */ + DigitalOut myled(D6); +DigitalOut myGreenLed(D7); // ON = Lora Connected +DigitalOut myBlueLed(D8); // Blink twice = Sends data or increments counter value Pelase proceed void SerialDisplayRefresh( void ) { @@ -812,6 +819,8 @@ SerialDisplayUpdateKey( 13, AppSKey ); #endif + myGreenLed = 0; + myBlueLed = 0; DeviceState = DEVICE_STATE_INIT; while( 1 ) @@ -824,11 +833,18 @@ mibReq.Type = MIB_NETWORK_JOINED; LoRaMacMibGetRequestConfirm( &mibReq ); SerialDisplayUpdateNetworkIsJoined( mibReq.Param.IsNetworkJoined ); + if(mibReq.Param.IsNetworkJoined == true) + myGreenLed = 1; + else + myGreenLed = 0; } if( UplinkStatusUpdated == true ) { UplinkStatusUpdated = false; SerialDisplayUpdateUplink( LoRaMacUplinkStatus.Acked, LoRaMacUplinkStatus.Datarate, LoRaMacUplinkStatus.UplinkCounter, LoRaMacUplinkStatus.Port, LoRaMacUplinkStatus.Buffer, LoRaMacUplinkStatus.BufferSize ); + + myBlueLed = 1; wait(1); myBlueLed = 0; wait(1); + myBlueLed = 1; wait(1); myBlueLed = 0; wait(1); } if( DownlinkStatusUpdated == true ) {