IA SensorSync API
Get Sensor Data with helper functions
Core Functions
Ultrasound Sensor
This function returns real-time distance to detected object in centimeters (float) as response.
Temperature Sensor
The following functions return current temperature and relative humidity as response.
Light Sensor
This function returns ambient light sensor' raw intensity value.
Higher values indicate brighter conditions, while lower values correspond to dimmer environments.
Note: The returned value requires data normalization/calibration for meaningful interpretation.
Sensor-specific scaling may be necessary to convert to standard units (lux / lumens).
Air Quality Sensor
The function returns a calibrated air quality reading from the sensor, accounting for baseline resistance, environmental factors (temperature/humidity), and nonlinear gas response. Higher values indicate poorer air quality (e.g., elevated CO₂, NH₃, or VOC levels), while lower values correspond to cleaner air.
Alcohol Sensor
This function provides sensor output indicating relative alcohol particle density in air.
Higher values suggest greater alcohol concentration.
CO Gas Sensor
This function provides sensor output indicating relative CO2 particle density in air.
Higher values suggest greater alcohol concentration.
Flame Sensor
Present the resistance value, the value would drop when there is fire.
Data cleaning to interpret the meaning is required.
Button Module
The function returns:
1 (orHIGH) when the button is actively pressed
0 (orLOW) when the button is released
Example of detecting button get pressed
Sound Sensor
Get the sound vibration in the air to determine the threshold of sound level.
Example for using the sound sensor to collect noise level.
In general, it keeps tracks of the sound intensity in the room for a few times to calculate the average, then we can use the average to determine whether the environment is loud, normal or quiet.
How to use IA SensorSync API functions?
In the following example, we can store the data we got from the sensor and do data cleaning.
Company
© 2025 INCIPE Academy Limited





