MAX20361 Demo with LoRa Module on LP0 mode

Dependencies:   SX1276GenericLib USBDevice

Fork of NonPingPong_PICO_LoRa_LP0 by Walter Luu

Revision:
5:9e751733a6f3
Parent:
3:85fc843a9d7d
--- a/OT07Lib/OT07_lib.cpp	Mon Oct 12 21:56:39 2020 +0000
+++ b/OT07Lib/OT07_lib.cpp	Tue Oct 13 00:45:46 2020 +0000
@@ -140,6 +140,18 @@
     return resp;  
 }
 
+
+double calc_temperature(char *data) {
+    
+    // data is an array of size 2
+    
+    int count = (int)(data[0]*256 + data[1]);
+    if (count >= 32768)count = count - 65536;     // 2s comp
+    double Temp = (double)count*0.005; 
+    
+    return Temp;
+}
+
 // other functions
 
 //void write_settings_file(int interval, bool device_logged[MAX_DEVICES])