Example Code for Arduino UNO-Multiple SCI Modules
Use two SCI DAQ modules simultaneously with Arduino UNO. Users can learn how to configure multiple modules and retrieve data from each.
Hardware Preparation
- DFRduino UNO R3 + Gravity: IO Expansion Shield x 1
- SCI DAQ Module x 1
- Supported sensors (e.g., SEN0334, SEN0514)
- Connection cables
Software Preparation
- Arduino IDE
- Download and install the .zip library DFRobot_RP2040_SCI Library. (About how to install the library?)
- Or search and install the DFRobot_RP2040_SCI library in the library manager
Wiring Diagram

Other Preparation Work
- Set the ID of one SCI module to 0x22: Press "S" to enter settings, select "Set Board ID", choose 0x22, restart.
- Connect both modules to Arduino UNO via I2C.
Sample Code
#include "DFRobot_RP2040_SCI.h"
DFRobot_RP2040_SCI_IIC SCI1(/*addr=*/0x21, &Wire);
DFRobot_RP2040_SCI_IIC SCI2(/*addr=*/0x22, &Wire);
void setup() {
Serial.begin(115200);
while(SCI1.begin() != 0){delay(1000);};
while(SCI2.begin() != 0){delay(1000);};
}
void loop() {
Serial.println(SCI1.getValue(SCI1.eALL,"Temp_Air"));
Serial.println(SCI1.getValue(SCI1.eALL,"Humi_Air"));
Serial.println(SCI1.getValue(SCI1.eALL,"Light"));
Serial.println("-------------------");
Serial.println(SCI2.getValue(SCI2.eALL,"AQI"));
Serial.println(SCI2.getValue(SCI2.eALL,"TVOC"));
Serial.println(SCI2.getValue(SCI2.eALL,"ECO2"));
Serial.println(SCI2.getValue(SCI2.eALL,"Altitude"));
Serial.println(SCI2.getValue(SCI2.eALL,"Pressure"));
Serial.println("-------------------");
}
Result
- The serial monitor outputs data from both SCI modules (e.g., Temp_Air from SCI1, AQI from SCI2).
Additional Information
- Ensure each module has a unique ID (0x21, 0x22, 0x23) to avoid conflicts.
Was this article helpful?
