Sample code to read all sensor values from databot

I’d like to write a simple program that gathers all sensor values and prints them to the serial port. My ultimate goal is to take these values and post them to an MQTT endpoint. I have one running that I use for my Unitree Go1 and I’m working to bring databot’s sensor values to the quadruped. It would be incredibly cool!

I have a simple example of getting the CO2 sensor value and posting it to an MQTT server (not on Go1) for test purposes. I’d like to read all sensor values and ship them up, but not sure the best way to approach this. It could even be in the same JSON format that is sent over Bluetooth.

@Dharmik do you have a basic example of reading all sensor values in a loop? Preferably I’d do this at 1Hz and then tweak it from there.

Thanks.

Hello,

You can definitely send sensor data via MQTT. As of now, we did not have any example that fetches all sensor data combined in one code tho our main code have all sensors combined but it will be a little difficult to understand as it has lots of other stuff.

But we have all individual sensor code examples you can find them in our databot Arduino library here.

1 Like