Ciao library & Temperature & Humidity Sensor v1.0 conflict

Hello,
I'm new to Arduino but not new to programming. I have a following setup:

  • Arduino Uno WiFi

  • Grove Base Shield v2

  • Shinyei PPD42 connected to D8 on Grove Shield

  • Temperature & Humidity Sensor v1.0 connected to I2C on Grove Shield

  • Air Quality Sensor v 1.3 connected to A0 on Grove Shield

All sensors are running because I can see the measurements on serial console. But I want to use Ciao in order to post data to Thingspeak. And this works as well but only when I unplug temp & humidity sensor from I2C port. Because if I don't then I can't see anything on WiFi Console when navigate browser to WiFi Uno setup page. It just stays blank, while when temp & humidity sensor is unplugged output is for example:

WiFi Start
Ciao is ready
Initializing air quality sensor ...
The init voltage is ... 60
Air quality sensor ready.
Test begin...
Air quality value: 58 Air fresh
Send data on ThingSpeak Channel

and so on.
I'm using this library for measuring temperature and humidity values: Grove - Temperature&Humidity Sensor (High-Accuracy &Mini) v1.0 | Seeed Studio Wiki
and here is my code for the whole thing:

#include <UnoWiFiDevEd.h>
#include <TH02_dev.h>
#include "AirQuality.h"
#include "Arduino.h"

    #define CONNECTOR     "rest" 
    #define SERVER_ADDR    "api.thingspeak.com"
    #define APIKEY_THINGSPEAK "xxxxxxxxxxxxxxx";

    unsigned long starttime;
    unsigned long sampletime_ms = 60000; // TIME BETWEEN MEASURES AND UPDATES
    unsigned long triggerOnP2;
    unsigned long triggerOffP2;
    unsigned long pulseLengthP2;
    unsigned long durationP2;
    boolean valP2 = HIGH;
    boolean triggerP2 = false;
    float ratioP2 = 0;
    float countP2;
    float concLarge;
    unsigned long triggerOnP1;
    unsigned long triggerOffP1;
    unsigned long pulseLengthP1;
    unsigned long durationP1;
    boolean valP1 = HIGH;
    boolean triggerP1 = false;
    float ratioP1 = 0;
    float countP1;
    float concSmall;
    AirQuality airqualitysensor;
    int current_quality =-1;
    
    void setup() {
      pinMode(8, INPUT); // > 1um
      starttime = millis();
      
      // Power up,delay 150ms,until voltage is stable for TH module to work
      delay(150);
      // Reset HP20x_dev 
      TH02.begin();
      delay(100);
	  
      Ciao.begin();
      Ciao.println("Ciao is ready");
	  
      airqualitysensor.init(14);
    }
    
    void measure(){
      valP1 = digitalRead(8); // > 1um
      valP2 = digitalRead(9); // > 2.5um

      if(valP1 == LOW && triggerP1 == false){
        triggerP1 = true;
        triggerOnP1 = micros();
      }
      if (valP1 == HIGH && triggerP1 == true){
        triggerOffP1 = micros();
        pulseLengthP1 = triggerOffP1 - triggerOnP1;
        durationP1 = durationP1 + pulseLengthP1;
        triggerP1 = false;
      }

      if(valP2 == LOW && triggerP2 == false){
        triggerP2 = true;
        triggerOnP2 = micros();
      }
      if (valP2 == HIGH && triggerP2 == true){
        triggerOffP2 = micros();
        pulseLengthP2 = triggerOffP2 - triggerOnP2;
        durationP2 = durationP2 + pulseLengthP2;
        triggerP2 = false;
      }

      if ((millis() - starttime) > sampletime_ms) {
        // Integer percentage 0=>100
        ratioP1 = durationP1/(sampletime_ms*10.0); // Integer percentage 0=>100
        ratioP2 = durationP2/(sampletime_ms*10.0);

        countP1 = 1.1*pow(ratioP1,3)-3.8*pow(ratioP1,2)+520*ratioP1+0.62;
        countP2 = 1.1*pow(ratioP2,3)-3.8*pow(ratioP2,2)+520*ratioP2+0.62;
        float PM10count = countP1;
        float PM25count = countP1 - countP2;

        //PM10 count to mass concentration conversion
        double r10 = 2.6*pow(10,-6);
        double pi = 3.14159;
        double vol10 = (4/3)*pi*pow(r10,3);
        double density = 1.65*pow(10,12);
        double mass10 = density*vol10;
        double K = 3531.5;
        concLarge = (PM10count)*K*mass10;
        
        //PM2.5 count to mass concentration conversion
        double r25 = 0.44*pow(10,-6);
        double vol25 = (4/3)*pi*pow(r25,3);
        double mass25 = density*vol25;
        concSmall = (PM25count)*K*mass25;

        // Measure the temperature
        float temper = TH02.ReadTemperature(); 

        // Measure the humidity
        float humidity = TH02.ReadHumidity();

        // Check the air pollution (harmful gases)
        current_quality=airqualitysensor.slope();

        String uri = "/update?api_key=";
        uri += APIKEY_THINGSPEAK;
        uri +="&field1=";
        uri += String(concLarge);
        uri +="&field2=";
        uri += String(concSmall);
        uri +="&field3=";
        uri += String(temper);
        uri +="&field4=";
        uri += String(humidity);
        uri +="&field5=";
        uri += String(current_quality);
              
        Ciao.println("Send data on ThingSpeak Channel"); 
        CiaoData data = Ciao.write(CONNECTOR, SERVER_ADDR, uri);
        if (!data.isEmpty()){
          Ciao.println("PM10: " + String(concLarge));
          Ciao.println("PM2.5: " + String(concSmall));
          Ciao.println( "State: " + String (data.get(1)) );
          Ciao.println( "Response: " + String (data.get(2)) );
        }
        else{ 
          Ciao.println("Write Error");
        } 

        //Reset Values
        durationP1 = 0;
        durationP2 = 0;
        starttime = millis();
      }
    }
    void loop() {
      measure(); // Recall of the measure program
    }
    
    ISR(TIMER1_OVF_vect)
    {
      if(airqualitysensor.counter==61)//set 2 seconds as a detected duty
      {
        airqualitysensor.last_vol=airqualitysensor.first_vol;
        airqualitysensor.first_vol=analogRead(A0);
        airqualitysensor.counter=0;
        airqualitysensor.timer_index=1;
        PORTB=PORTB^0x20;
      }
      else
      {
        airqualitysensor.counter++;
      }
    }

As soon as I comment TH02.begin(); and unplug the sensor it starts working - meaning I can see output on WiFi console and data is posted online. But then I can't send my temperature and humidity measurements to Thingspeak :confused: I think there must be some kind of conflict between Ciao and TH02 libraries but can't find the root cause...

Does anyone has any idea? Maybe Ciao library is simply not designed to work with I2C devices? I couldn't find any explanation so far.

Maybe Ciao library is simply not designed to work with I2C devices?

The Ciao library is an arduino.org library, NOT an arduino.cc library. Ask there for help with their library.

Since Arduino.org is no more available, if anyone has any thoughts or insight on this please do let know.