Closed peterhsi75 closed 2 years ago
The support staff Shaffer at Heltec provided me with a utility code to scan the IIC bus, and provide two functions to communicate with the sensor and OLED. I used wire1.xxxx functions to communicate with sensor and wire.xxxx functions to communicate with OLED display, everything works now. Thank you very much for Heltec's quick help!!
The exampleUsage.ino code supplied by Sensirion works perfectly on the Heltec WiFi Kit 32 (ESP32) board. I can receive correct sensor data via COM port.
However, when I tried to display the sensor reading on the local OLED display by adding a few line of the code in the setup: Heltec.display->init(); Heltec.display->flipScreenVertically();
Heltec.display->setFont(ArialMT_Plain_10); Heltec.display->clear();
Heltec.display->drawString(0, 0, "SCD41 CO2 V100"); Heltec.display->display();
The OLED shows the correct display, but I can no longer receive correct data on my COM port. Instead I got the following error message: Error trying to execute readMeasurement(): Received NACK on transmit of address_
The IIC address of SCD41 is 0x62. The IIC address for SSD1306 OLED is 0x3C. No conflict here.
Any ideas or suggestions on how to resolve this problem?