get_all_sensors_values()
- 1 Minute to read
get_all_sensors_values()
- 1 Minute to read
Article Summary
Share feedback
Thanks for sharing your feedback!
Synchronously get current state of all the sensors.
Reference
Arguments
None
Return
Dictionary with current values of all the sensors, where keys are paths.
Examples
Reading all the sensors
...
sensors.get_all_sensors_values()
print(all_sensors_info)
...
Output
{
'thermometer': 18.2,
'environment': {
'temperature': 23.4,
'altitude': 842.0,
'humidity': 32.4,
'pressure': 101.32,
},
'imu': {
'lin_acc': {
'x' : 0.0024,
'y' : 0.0438,
'z' : 0.9763,
},
'rot_vel': {
'x': 0.0234,
'y': 0.0031,
'z': 0.2302,
},
...
},
'sonar': {
'1': 0.25,
'2': 0.12,
'3': 0.54,
...
},
'line_sensor': {
'1': False,
'2': True,
'3': True,
...
},
...
}
Was this article helpful?