This is the code for the STM32L072 in order to read from LoRa and pass data through serial

Dependencies:   BufferedSerial SX1276GenericLib mbed

Fork of TRANSMITTER by gabrio gabrio

Files at this revision

API Documentation at this revision

Comitter:
gabrio
Date:
Wed May 30 14:32:32 2018 +0000
Parent:
4:f9e97728d3a2
Commit message:

Changed in this revision

Receiver/Receiver.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/Receiver/Receiver.cpp	Tue May 29 17:01:30 2018 +0000
+++ b/Receiver/Receiver.cpp	Wed May 30 14:32:32 2018 +0000
@@ -211,7 +211,7 @@
         switch( State )
         {
         case RX:
-        	//dprintf("Received something, length:%d of %d",BufferSize,BUFFER_SIZE);
+        	dprintf("Received something, length:%d of %d",BufferSize,BUFFER_SIZE);
         	//data is in Buffer, size BufferSize
         	if(BufferSize<BUFFER_SIZE)
         		Buffer[BufferSize]=0;   // Add null char!
@@ -220,7 +220,7 @@
         	dprintf("%s",Buffer);
         	wait_ms(2000);
         	Radio->Rx( RX_TIMEOUT_VALUE );
-            //State = LOWPOWER;
+            State = LOWPOWER;
             break;
         case TX:    
         	dprintf("TX");
@@ -247,8 +247,9 @@
             State = LOWPOWER;
             break;
         case LOWPOWER:
+        	dprintf("LOWPOWER");
         	
-        	dprintf("LOWPOWER");
+        	wait_ms(1000);
         	sleep();
             break;
         default: