Example Code for Arduino UNO-All Sensor Data
Retrieve all sensor data from the specified port in a formatted string. Users can learn how to get comprehensive sensor data for parsing and table generation.
Hardware Preparation
- DFRduino UNO R3 + Gravity IO Expansion Shield x 1
- SCI DAQ Module x1
- SEN0334 Gravity: SHT31-F Digital Temperature and Humidity Sensor x1
- SEN0228 Gravity: I2C VEML7700 Ambient Light Sensor x1
- Double-head PH2.0-4P Connector x2
- Gravity 4P Connector x1
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
- Ensure the SCI DAQ module is properly connected to the Arduino UNO via the Gravity IO Expansion Shield.
- Install the required library in Arduino IDE.
Sample Code
#include "DFRobot_RP2040_SCI.h"
DFRobot_RP2040_SCI_IIC sci(/*addr=*/RP2040_SCI_ADDR_0X21, &Wire);
void setup() {
Serial.begin(115200);
while(!Serial){ //Waiting for USB Serial COM port to open.
}
Serial.print("Initialization SCI DAQ Module...");
while(sci.begin() != 0){
Serial.println("failed. Please check whether the hardware connection is wrong.");
delay(1000);
Serial.print("Initialization SCI DAQ Module...");
}
Serial.println("done.");
}
void loop() {
String ifAll = sci.getInformation(sci.eALL, true);
Serial.println(ifAll);
Serial.println();
delay(1000);
}
Result

Additional Information
- The output format is "Name 1: Value 1 Unit 1, Name 2: Value 2 Unit 2".
Was this article helpful?
