Oregon Scientific Decoder V2 and V3 for Nucleo-F401RE

Dependencies:   Oregon_Decode

Oregon-Scientific Decoder for V2 and V3 protocol. As exemple it handles THGR122NX (V2) and THGR810 (V3) sensors.

The software use interrupts to collect frames in a buffer and decode them in a background task.

Revision:
1:265557f4b6b8
Parent:
0:7d471396cb64
--- a/main.cpp	Sat Oct 12 11:55:05 2019 +0000
+++ b/main.cpp	Sat Jul 18 07:58:54 2020 +0000
@@ -1,16 +1,19 @@
 #include "mbed.h" 
 #include "Regul.h"
+//#include "rtos.h"
 
 void Init_Oregon(void);
 extern measure_t Sensor[];
 
 DigitalOut led1(LED1);
-Serial pc(SERIAL_TX, SERIAL_RX);
+//static BufferedSerial pc(USBTX, USBRX,115200); // tx, rx
 
 int main()
 {
 measure_t Measure;
 
+    //pc.baud(115200);
+    DBG("Start");
     Init_Oregon();
    // NVIC_SetPriority(EXTI9_5_IRQn, 0); //set interupt to highest priority 0
    // NVIC_SetPriority(TIM3_IRQn,1); // set mbed tickers to lower priority than other things
@@ -24,7 +27,7 @@
             if (Sensor[i].timestamp !=0)
                 {
                 Measure=Sensor[i];
-                pc.printf("\r\nCh%d : %0.1f%cC  %0.0f%%\r\n", i , Measure.temp1, 0xC2B0, Measure.hum1);
+                printf("\r\nCh%d : %0.1f%cC  %0.0f%%\r\n", i , Measure.temp1, 0xC2B0, Measure.hum1);
                 Sensor[i].timestamp = 0;
                 }
             }