RF433MHz project for telemetry with sensor BME280

I bought RF433Mhz set of STX882 and SRX882 and I have created RF-OT project with the code examples of scanner, tester and traffic light (semafor) system of sender with buttons and traffic light model with leds for toys cars etc. .

Here is my second RF433MHz project for telemetry with temperature, humidity and air pressure sensor BME280.

Both these my projects are based on RF library rc-switch from Github. Next info is in schetches for sender with RF module STX882 and NodeMcu V1.0 (V2) and receiver with RF module STX882 and Arduino Nano clone.

Here is sketch for sending of data from BME280 sensor with RF433MHz technology
Multifunction sensor BME280 for measuring
temperature, humidity and air pressure :

//RF-433MHz-STX882-BME280-sender
/*
Sketch for sending of data from BME280 sensor with RF433MHz technology
Multifunction sensor BME280 for measuring 
 temperature, humidity and air pressure  is used
BME280 project details were addapted 
from https://randomnerdtutorials.com by Riu Santos        
Data are coupled with code for specification of different data
Example : specialised code for temperature is here set to  10 000 000
          and to this code is added temperature (example) 23.45 * 100 = 2345
          if temperature < 0 , the special code is set to 11 000 000
          special code for humidity is set  to 12 000 000
          special code for air press is set to 13 000 000
This RF433 MHz application is based on library and examples 
from  https://github.com/sui77/rc-switch/
Reprogrammed by PavelOu
rewrited from RF-433MHz-STX882-BME280-sender-po-5
version of NodeMcu V1.0 (V2)
*/
// RF 433 library
#include <RCSwitch.h>

//Adafruit library
#include <Wire.h>
#include <Adafruit_BME280.h>
#include <Adafruit_Sensor.h>


String sketchName = "RF-433MHz-STX882-BME280-sender.ino";
const int ledPin = D3;
const int txPin = D5;
byte protocolNr = 2;
long int specialCode = 10000000;
byte nrBits = 32;
int intervalDat = 100; // ms

long int dataInt = 0;

byte dataMode = 0;
char markRx = 0;

bool status;
float temp = 23.45; // examples
float hump = 54.56;
float presp = 1021.89 ;

int timeRep = 30;  //time for repeating of measuring in sec
int timeStep = 1;
bool i2cOn = false;


long int dataPom;

Adafruit_BME280 bme; // I2C => SCL = D1, SDA = D2
//Adafruit_BME280 bme(BME_CS); // hardware SPI
//Adafruit_BME280 bme(BME_CS, BME_MOSI, BME_MISO, BME_SCK); // software SPI

#define SEALEVELPRESSURE_HPA (1013.25)


// creating objekt senderRFe from library
RCSwitch senderRF = RCSwitch();

void printValues()    //for test only
 {
  Serial.print("Temperature = ");
  Serial.print(bme.readTemperature());
  Serial.println(" *C");

  Serial.print("Humidity = ");
  Serial.print(bme.readHumidity());
  Serial.println(" %");

  //Convert temperature to Fahrenheit
  Serial.print("Temperature = ");
  Serial.print(1.8 * bme.readTemperature() + 32);
  Serial.println(" *F");

  Serial.print("Pressure = ");
  Serial.print(bme.readPressure());
  Serial.println(" Pa");

  Serial.print("Pressure = ");
  Serial.print(bme.readPressure() / 100.0F);
  Serial.println(" hPa");

  Serial.print("Approx. Altitude = ");
  Serial.print(bme.readAltitude(SEALEVELPRESSURE_HPA));
  Serial.println(" m");
 }

void setup() 
 {
  Serial.begin(9600);
  while (!Serial)
   {
    delay(1000);
   }
  pinMode(ledPin,OUTPUT);     // this led signalised RF transmission
  digitalWrite(ledPin,HIGH);
  delay(1000);
  digitalWrite(ledPin,LOW);
  Serial.println();
  Serial.println(sketchName);
  Serial.println("RF-OT 433 Mhz sender is starting ...");

// default settings
  // (you can also pass in a Wire library object like &Wire2)
  status = bme.begin(0x76);  
  //status = true;  //for test without BME280 sensor
  if (!status) 
   {
    Serial.println("Could not find a valid BME280 sensor, check wiring!");
   }
  else
   { 
    printValues();  //BME280 test
   } 
  
  temp = 23.45; //for test only
  
  
  // optional set of protocol on nr.2 //must be the some in the receiver
  // senderRF.setProtocol(2);
  // optional set of protocol nr.5
  // senderRF.setRepeatTransmit(5);  //here not used
  protocolNr = 2;
  Serial.print("Protocol: "); 
  Serial.println(protocolNr);
  //testData = 22;
  //Serial.print("Tested data: ");
  //Serial.println(testData);
  specialCode = 10000000;
  Serial.print("special data set: ");
  Serial.println(specialCode);
  nrBits = 32;
  Serial.print("Used nr of bits: ");
  Serial.println(nrBits);
  intervalDat = 100;
  Serial.print("Interval dat: "); //optional
  Serial.println(intervalDat);
  markRx = 0;
  //start with repetition in time 20 sec
  timeRep = 20;
  dataMode = 2;
  senderRF.setProtocol(protocolNr);  
  // start of sending on txPin
  senderRF.enableTransmit(txPin);
  
}

void loop() 
 {
  if (dataMode == 0)
    {
     Serial.println();
     Serial.println(sketchName);
     Serial.println("New settings:");         
     Serial.println("A = data BME only, E = RF data BME, Tint = time for repeting");
     dataMode = 1;
     markRx = 0;
     digitalWrite(ledPin,LOW);  // turn the LED
    }
 if (Serial.available())
    {
     markRx = Serial.read();
     Serial.print("choosed: ");
     Serial.println(markRx);
     timeRep = 0;
     Serial.flush();
     if ( markRx == 65 )    // A
          {
            Serial.println("Data BME");
            //digitalWrite(ledPin, HIGH);  // turn the LED on
            printValues();
            dataMode = 0;               
          }
     /* this section is prepared for tests only
     if ( markRx == 66 )    // B
          {
            String Bstring = Serial.readString();
            Bstring.trim();
            nrBits = Bstring.toInt();
            Serial.print("Bits: ");
            Serial.println(nrBits);
            dataMode = 0;          
          }
     if ( markRx == 67 )    // C
          {
            String Cstring = Serial.readString();
            Cstring.trim();
            specialCode = Cstring.toInt();
            Serial.print("Special code: ");
            Serial.println(specialCode);
            dataMode = 0;
          }
     if ( markRx == 68 )   // D
          {
            // reading end command for sending - example 101 for set on green Led
            String textToSend = Serial.readString();
            dataInt = textToSend.toInt();
            Serial.print("Sending Int Data: ");
            Serial.println(dataInt);
            temp = dataInt / 100.0;
            //digitalWrite(ledPin, HIGH);  // turn the LED on
            dataMode = 2;
          }
      if ( markRx == 77 )   // M
          {
            // reading end command for sending - example 101 for set on green Led
            String textToSend = Serial.readString();
            dataInt = textToSend.toInt();
            Serial.print("Sending Int Data with minus: ");
            Serial.println(dataInt);
            temp = - dataInt / 100.0;
            digitalWrite(ledPin, HIGH);  // turn the LED off
            dataMode = 2;
          }
      if (markRx == 80)  // P
        {
            String Pstring = Serial.readString();
            Pstring.trim();
            protocolNr = Pstring.toInt();
            Serial.print("Protocol: ");
            Serial.println(protocolNr);
            senderRF.setProtocol(protocolNr);
            dataMode = 0;  
           }
       */    
            
     if (markRx == 69) // E 
         {
          Serial.println("Data BME send by RF");
          //digitalWrite(ledPin, HIGH);  // turn the LED on   
          dataMode = 2;                        
         }
     if (markRx == 84)  // T
        {
            String Tstring = Serial.readString();
            Tstring.trim();
            timeRep = Tstring.toInt();
            Serial.print("Time for repeating: ");
            Serial.print(timeRep);
            Serial.println(" in sec");
            senderRF.setProtocol(protocolNr);
            if (timeRep>0)
             {
              dataMode = 2;  
              timeStep = 0;
             }
            else  
             {
              dataMode = 0;
              Serial.println("time zero ??");
             }
           }
     markRx = 0;  
     Serial.flush();
    } 
   if (dataMode == 2 )
      {
        //start of measuring data and RF transmission
        digitalWrite(ledPin,HIGH);
        Serial.print("Temperature = ");
        if (status)
         {
          temp = bme.readTemperature();
         }
        Serial.print(temp);
        Serial.println(" *C");
        if (temp > 0)
         {
          specialCode = 10000000;
          dataPom = temp * 100; // dataPom = 23.45 * 100 = 2345
         }
        else
         {
          specialCode = 11000000;         
          dataPom = (-1) * temp * 100; // dataPom = -1 * - 23.45 * 100 = 2345
         }   
        //dataPom = temp * 100; // dataPom = 23.45 * 100 = 2345
        Serial.print("dataPom = ");
        Serial.println(dataPom);
        dataPom = specialCode + dataPom; //10000000 + 2345 = 10002345
        Serial.print("specialCode + dataPom = ");
        Serial.println(dataPom);        //data are prepared for RF transmission
        senderRF.setProtocol(protocolNr);  
        senderRF.send(dataPom,nrBits);  // data are transfered
        //back recounting (in receiver) example:
        //dataResult = dataPom - specialCode = 10234500 - 10000000 = 234500
        //dataPom = dataPom - dataResult = 10234500 - 234500 = 10000000
        //dataUnit = dataPom / 1000000 = 10000000 / 1000000 = 10
        //dataUnit = 10 => Unit is plus temp
        //dataUnit = 11 => Unit is minus temp etc.
        //temp = dataResult / 10000 = 234500 /10000 = 23.45 *C
        // if dataUnit == 11 => temp = -23.45
        // pause before preparing and transmitting of next data
        delay(intervalDat);        
        Serial.print("Humidity = ");
        if (status)
         {
          hump = bme.readHumidity();
         }
        Serial.print(hump);
        Serial.println(" %");
        specialCode = 12000000;
        dataPom = hump * 100; // dataPom = 43.45 * 100 = 4345
        Serial.print("dataPom = ");
        Serial.println(dataPom);
        dataPom = specialCode + dataPom; //12000000 + 4345 = 12004345
        Serial.print("specialCode + dataPom = ");
        Serial.println(dataPom);
        senderRF.setProtocol(protocolNr);  
        senderRF.send(dataPom,nrBits);
        delay(intervalDat);         
        Serial.print("Pressure in Pa = ");
        if (status)
         {
          presp = bme.readPressure();
         }
        Serial.println(presp);
        Serial.print("Pressure in hPa= ");
        Serial.print( presp / 100.0);
        Serial.println(" hPa");
        specialCode = 13000000;
        dataPom = presp * 10; // dataPom = 10216.78 * 10 = 102167 in deko Pa
        Serial.print("dataPom = ");
        Serial.println(dataPom);
        dataPom = specialCode + dataPom; //13000000 + 102167= 13102167
        Serial.print("specialCode + dataPom = ");
        Serial.println(dataPom);
        senderRF.setProtocol(protocolNr);  
        senderRF.send(dataPom,nrBits);
        /* not used
        Serial.print("Approx. Altitude = ");
        Serial.print(bme.readAltitude(SEALEVELPRESSURE_HPA));
        Serial.println(" m");
        */
        // pause before new transmitting of data
        delay(1000);
        digitalWrite(ledPin,LOW);
        if (timeRep == 0)
         {
          //delay(intervalDat);
          dataMode = 0;
         }
        else
         {
          Serial.print("Time: ");
          Serial.print(timeRep);
          Serial.println(" sec is starting ...");
          timeStep = 0;
          dataMode = 3; 
         }
      } // end of dataMode = 2
   if (dataMode == 3)
      {
          timeStep += 1;
          if (timeStep == timeRep)
           {
            timeStep = 0;
            Serial.println("*");
            Serial.print("Time: ");
            Serial.print(timeRep);
            Serial.println(" is on !");
            dataMode = 2;
           }
          else
           {            
            Serial.print(timeStep);
            Serial.print(",");
            delay(1000); 
           }
      } // end of dataMode = 3        
}

I have already published similar RF433MHz project or showcase for my example for RF control of a model of traffic lights … and I have tried to create a showcase in Project Hub, but due to my problems probably with my web connection, OS W10 32 bit etc. I could not to insert there my sketches .. so I am sorry, I continue with my postes here on Forum …

Here is my sketch for reading of data from BME280 sensor with RF433MHz technology :

//RF-433MHz-SRX882-BME280-receiver
/*
 Sketch for reading of data from BME280 sensor with RF433MHz technology
Data from RF transmitter are formed with code for specification of different data
Example : specialised code for temperature is here set to  10 000 000
          and to this code is added temperature (example) 23.45 * 100 = 2345
          if temperature < 0 , the special code is set to 11 000 000
          special code for humidity is set  to 12 000 000
          special code for air press is set to 13 000 000
This RF433 MHz application is based on library and examles 
from  https://github.com/sui77/rc-switch/
Reprogrammed by PavelOu
transformed from ReceiveDemo_Simple-po
and next transformed from RF433-OT-semafor-receiver-po-7
version for Arduino Nano Clone
*/

#include <RCSwitch.h>

RCSwitch mySwitch = RCSwitch();

String sketchName = "RF-433MHz-SRX882-BME280-receiver";
//static int rfPin = 2;

unsigned int *raw;

const int ledPinRF = 6; // yellow Led for RF receive of new data

bool bmeDataOn = false;

byte protocolNr = 2;  //must be same as in transmitter
byte nrBits = 32;     // - '' -
long int specialCode = 1000000;  // - '' -
long int rfData = 0;
long int rfUnit = 0;
long int rfPom = 0;

unsigned long decimal;
unsigned int lengthOfWord;
unsigned int delayOfPulse;
unsigned int protocol; 


byte dataMode = 0;
bool tempOn = false;
bool humpOn = false;
bool prespOn = false;

float temp = 0;
float hump = 0;
float presp = 0;

void setup() 
 {
  Serial.begin(9600);
  while (!Serial) 
   {
     delay(1000);     
     // wait for serial port to connect. Needed for native USB port only
   }
  delay(1000);
  pinMode(ledPinRF,OUTPUT);
  digitalWrite(ledPinRF,HIGH);
  delay(2000);
  digitalWrite(ledPinRF,LOW);
  Serial.println(sketchName);
  Serial.println("RF 433 Mhz  receiver of telemetry data");

  dataMode = 0;
  bmeDataOn = false;
  tempOn = false;
  humpOn = false;
  prespOn = false;

  protocolNr = 2;
  nrBits = 32; 

  // Receiver on interrupt 0 => that is pin #2 for Arduina
  // Receiver on interrupt 0 => that is pin GPIO00 as D3 in ESP8266
  mySwitch.enableReceive(0);  
 }

void loop() 
 {
  if (mySwitch.available())
        {
           decimal = mySwitch.getReceivedValue();
           delayOfPulse = mySwitch.getReceivedDelay();
           lengthOfWord = mySwitch.getReceivedBitlength();
           protocol = mySwitch.getReceivedProtocol();
           mySwitch.getReceivedRawdata();
           mySwitch.resetAvailable();
           /*
           Serial.println();                         
           Serial.print(" Protocol: "); //for test only
           Serial.println(protocol);
           Serial.print("Decimal: "); 
           Serial.println(decimal);
           Serial.print("Bits: ");
           Serial.print(lengthOfWord);
           Serial.print(" PulseLength: ");
           Serial.print(delayOfPulse);
           Serial.print(" microseconds");
           Serial.println();
           */
           /*         
           Serial.print("Raw data: ");
           for (unsigned int i=0; i<= lengthOfWord*2; i++) 
                {
                  Serial.print(raw[i]);
                  Serial.print(",");
                }
            Serial.println();
            */
            if (!bmeDataOn)
              {
               dataMode = 1;
               //Serial.println("RF data On !");
              }
             else
              {
                delay(100);
                digitalWrite(ledPinRF,LOW);                                
              }
        }       
 if (dataMode == 1) 
  {
    if (!bmeDataOn)
     {
      //Serial.println("RF433 control of received data: "); // for test only
      dataMode = 2;
     }
    else
     {  
       dataMode = 0;
     }  
   } //end of dataMode = 1   
   
  if (dataMode == 2)
   {
    if (protocol != protocolNr)
     {
        //Serial.println("Another protocol !");   //for test only
        //Serial.println("This is not command for my semafor !");
        //Serial.println();
        delay(500);
        dataMode = 0;
        digitalWrite(ledPinRF,LOW);                        
     }
    else
     {
      if (lengthOfWord != nrBits)   
       {
        //Serial.println("Another bits length !"); //for test only
        //Serial.println("This is not command for my semafor ! !");
        //Serial.println();
        delay(500);
        digitalWrite(ledPinRF,LOW);                        
        dataMode = 0; 
       }
     }
  }
 if (dataMode == 2) 
  {
    // decimal example = 12002340  specialCode = 1000000
    rfUnit = decimal / specialCode; // 12002345 / 1000000 = 12
    //Serial.print("Result unit: ");
    //Serial.println(rfUnit);
    rfPom = rfUnit * specialCode; // 12 * 1000000 = 12000000
    //Serial.print("Result pom: ");
    //Serial.println(rfPom);
    rfData = decimal - rfPom; // 12002345 - 12000000 = 2345
    //Serial.print("Result data: ");
    //Serial.println(rfData);
    switch(rfUnit)
     {
      case 10:
       if (!tempOn)
        {
          digitalWrite(ledPinRF,HIGH);    
          temp = rfData/100.0;
          //Serial.println("Temp LED On !");   // for test only     
          //Serial.print("Temp = ");
          //Serial.println(temp);
          //delay(500); 
          tempOn = true;
          humpOn = false;
          prespOn = false;
        }  
       break;       

      case 11:
       if (!tempOn)
        {
          temp = -1*rfData/100.0;
          //Serial.println("Temp LED On !");   // for test only     
          //Serial.print("Temp = ");
          //Serial.println(temp);
          //delay(500); 
          tempOn = true;
          humpOn = false;
          prespOn = false;
        }  
       break;       

      case 12:
       if (!humpOn)
        {
         hump = rfData/100.0;          
         //Serial.println("Hump On !"); //for test only
         //Serial.print("Hump=");
         //Serial.println(hump);
         //delay(500); 
         humpOn = true;
         prespOn = false;
        } 
       break; 

      case 13:
       if (!prespOn)
        {
         presp = rfData/100.0;         
         //Serial.println("Presp On !");  //for test only
         //Serial.print("Presp=");
         //Serial.println(presp);
         //delay(500); 
         prespOn = true; 
        } 
       break; 
       
      default:
       dataMode = 0;
       digitalWrite(ledPinRF,LOW);                                
       //delay(500);
     }
    //Serial.println(); // for test only
    if (tempOn&&humpOn&&prespOn)
     {
      //Serial.println("All RF data On !");
      bmeDataOn = true;
      dataMode = 0;     
      Serial.print("*");
      Serial.print(temp);
      Serial.print(",");
      Serial.print(hump);
      Serial.print(",");
      Serial.print(presp);
      Serial.println(",#,");
      tempOn = false;
      humpOn = false;
      prespOn = false;
      //Serial.println();
      digitalWrite(ledPinRF,LOW);
      //delay(1000);
      bmeDataOn = false;
     }
   }  
 }

I have tested the temperature measuring under zero , it went well, but the yellow Led was not

blink by RF receiving, what was confusing for me. So, I have repaired receiver sketch and

I add next green and red Leds for better indication of RF received process. Instead of there were read some nonsense temperatures, so I have tried to suspend them by inserting of the limit 100 for right received temperatures in my modified sketch :

//RF-433MHz-SRX882-BME280-receiver-1
/*
 Sketch for reading of data from BME280 sensor with RF433MHz technology
Data from RF transmitter are formed with code for specification of different data
Example : specialised code for temperature is here set to  10 000 000
          and to this code is added temperature (example) 23.45 * 100 = 2345
          if temperature < 0 , the special code is set to 11 000 000
          special code for humidity is set  to 12 000 000
          special code for air press is set to 13 000 000
This RF433 MHz application is based on library and examles 
from  https://github.com/sui77/rc-switch/
Reprogrammed by PavelOu
transformed from ReceiveDemo_Simple-po
and next transformed from RF433-OT-semafor-receiver-po-7
version for Arduino Nano Clone
revisioned from RF-433MHz-SRX882-BME280-receiver
yellow LED for incoming RF data only
new green LED for data are ready
new red Led for errors in RF
some changes in timings
*/

#include <RCSwitch.h>

RCSwitch mySwitch = RCSwitch();

//static int rfPin = 2; //default ISR (Interupt) for Arduinos

String sketchName = "RF-433MHz-SRX882-BME280-receiver-1";

unsigned int *raw;

const int ledPinRF = 6; // yellow Led for RF receive of new data
const int ledPinDataOn = 7; // green Led for RF received of valid data
const int ledPinRFerror = 8; // yellow Led for RF receive of new data

bool bmeDataOn = false;

byte protocolNr = 2;  //must be same as in transmitter
byte nrBits = 32;     // - '' -
long int specialCode = 1000000;  // - '' -
long int rfData = 0;
long int rfUnit = 0;
long int rfPom = 0;

unsigned long decimal;
unsigned int lengthOfWord;
unsigned int delayOfPulse;
unsigned int protocol; 


byte dataMode = 0;
bool tempOn = false;
bool humpOn = false;
bool prespOn = false;

float temp = 0;
float hump = 0;
float presp = 0;

void setup() 
 {
  Serial.begin(9600);
  while (!Serial) 
   {
     delay(1000);     
     // wait for serial port to connect. Needed for native USB port only
   }
  delay(1000);
  pinMode(ledPinDataOn,OUTPUT);
  pinMode(ledPinRF,OUTPUT);
  pinMode(ledPinRFerror,OUTPUT);
  digitalWrite(ledPinRF,HIGH);
  delay(1000);
  digitalWrite(ledPinRF,LOW);
  digitalWrite(ledPinDataOn,HIGH);
  delay(1000);
  digitalWrite(ledPinDataOn,LOW);
  digitalWrite(ledPinRFerror,HIGH);                        
  delay(1000);
  digitalWrite(ledPinRFerror,LOW);                          
  Serial.println(sketchName);
  Serial.println("RF 433 Mhz  receiver of telemetry data");

  dataMode = 0;
  bmeDataOn = false;
  tempOn = false;
  humpOn = false;
  prespOn = false;

  protocolNr = 2;
  nrBits = 32; 

  // Receiver on interrupt 0 => that is pin #2 for Arduina
  // Receiver on interrupt 0 => that is pin GPIO00 as D3 in ESP8266
  mySwitch.enableReceive(0);  
 }

void loop() 
 {
  if (mySwitch.available())
        {
           digitalWrite(ledPinRF,HIGH);                                              
           decimal = mySwitch.getReceivedValue();
           delayOfPulse = mySwitch.getReceivedDelay();
           lengthOfWord = mySwitch.getReceivedBitlength();
           protocol = mySwitch.getReceivedProtocol();
           mySwitch.getReceivedRawdata();
           mySwitch.resetAvailable();
           /*
           Serial.println();                         
           Serial.print(" Protocol: "); //for test only
           Serial.println(protocol);
           Serial.print("Decimal: "); 
           Serial.println(decimal);
           Serial.print("Bits: ");
           Serial.print(lengthOfWord);
           Serial.print(" PulseLength: ");
           Serial.print(delayOfPulse);
           Serial.print(" microseconds");
           Serial.println();
           */
           /*         
           Serial.print("Raw data: ");
           for (unsigned int i=0; i<= lengthOfWord*2; i++) 
                {
                  Serial.print(raw[i]);
                  Serial.print(",");
                }
            Serial.println();
            */
            if (!bmeDataOn)
              {
               dataMode = 1;
               //Serial.println("RF data On !");
              }
            delay(250);
            digitalWrite(ledPinRF,LOW);                                
            delay(250);                
        }       
 if (dataMode == 1) 
  {
    if (!bmeDataOn)
     {
      //Serial.println("RF433 control of received data: "); // for test only
      dataMode = 2;
     }
    else
     {  
       dataMode = 0;
     }  
   } //end of dataMode = 1   
   
  if (dataMode == 2)
   {
    if (protocol != protocolNr)
     {
        //Serial.println("Another protocol !");   //for test only
        //Serial.println("This is not command for my semafor !");
        //Serial.println();
        digitalWrite(ledPinRF,LOW);                        
        digitalWrite(ledPinRFerror,HIGH);                        
        delay(500);
        digitalWrite(ledPinRFerror,LOW);                        
        dataMode = 0;
      }
    else
     {
      if (lengthOfWord != nrBits)   
       {
        //Serial.println("Another bits length !"); //for test only
        //Serial.println("This is not command for my semafor ! !");
        //Serial.println();
        digitalWrite(ledPinRF,LOW);                        
        digitalWrite(ledPinRFerror,HIGH);                        
        delay(500);
        digitalWrite(ledPinRFerror,LOW);                        
      dataMode = 0; 
       }
     }
  }
 if (dataMode == 2) 
  {
    // decimal example = 12002340  specialCode = 1000000
    rfUnit = decimal / specialCode; // 12002345 / 1000000 = 12
    //Serial.print("Result unit: ");
    //Serial.println(rfUnit);
    rfPom = rfUnit * specialCode; // 12 * 1000000 = 12000000
    //Serial.print("Result pom: ");
    //Serial.println(rfPom);
    rfData = decimal - rfPom; // 12002345 - 12000000 = 2345
    //Serial.print("Result data: ");
    //Serial.println(rfData);
    switch(rfUnit)
     {
      case 10:
       if (!tempOn)
        {
          //digitalWrite(ledPinRF,HIGH);    
          temp = rfData/100.0;
          //Serial.println("Temp LED On !");   // for test only     
          //Serial.print("Temp = ");
          //Serial.println(temp);
          //delay(500); 
          if (temp < 101)
           {
            tempOn = true;            
           }
          else
           {
            digitalWrite(ledPinRF,LOW);  
            digitalWrite(ledPinRFerror,HIGH);                        
            delay(500);
            digitalWrite(ledPinRFerror,LOW);                          
           }
          humpOn = false;
          prespOn = false;
        }  
       break;       

      case 11:
       if (!tempOn)
        {
          float tempPom = rfData/100.0;
          if (tempPom < 100)
           {
            temp = -1*tempPom;
            tempOn = true;            
           }
          else
           {
            digitalWrite(ledPinRF,LOW);                        
            digitalWrite(ledPinRFerror,HIGH);                        
            delay(500);
            digitalWrite(ledPinRFerror,LOW);                          
           }
          //Serial.println("Temp LED On !");   // for test only     
          //Serial.print("Temp = ");
          //Serial.println(temp);
          //delay(500); 
          humpOn = false;
          prespOn = false;
        }  
       break;       

      case 12:
       if (!humpOn)
        {
         hump = rfData/100.0;          
         //Serial.println("Hump On !"); //for test only
         //Serial.print("Hump=");
         //Serial.println(hump);
         //delay(500); 
         humpOn = true;
         prespOn = false;
        } 
       break; 

      case 13:
       if (!prespOn)
        {
         presp = rfData/100.0;         
         //Serial.println("Presp On !");  //for test only
         //Serial.print("Presp=");
         //Serial.println(presp);
         //delay(500); 
         prespOn = true; 
        } 
       break; 
       
      default:
       dataMode = 0;
       digitalWrite(ledPinRF,LOW);                                
       //delay(500);
     }
    //Serial.println(); // for test only
    if (tempOn&&humpOn&&prespOn)
     {
      //Serial.println("All RF data On !");
      digitalWrite(ledPinRF,LOW);
      digitalWrite(ledPinDataOn,HIGH);
      bmeDataOn = true;
      dataMode = 0;     
      Serial.print("*");
      Serial.print(temp);
      Serial.print(",");
      Serial.print(hump);
      Serial.print(",");
      Serial.print(presp);
      Serial.println(",#,");
      tempOn = false;
      humpOn = false;
      prespOn = false;
      //Serial.println();
      delay(3000);
      digitalWrite(ledPinDataOn,LOW);
      bmeDataOn = false;
     }
   }  
 }

I found one rest in my sketch immediatelly, after :

switch(rfUnit)
     {
     default
can be yet an error indication :
  digitalWrite(ledPinRFerror,HIGH);                        
            delay(500);
            digitalWrite(ledPinRFerror,LOW);

I have measured the time constant of sensor BME280 at first in my plastbox system example, it was very long between 40 or 50 minutes ..

So I have extracted BME280 via Can 9 connectors, and than this constant was shorted on about 20 minutes. It is still very long ... but I am not sure , if there is some method how one to short next ..