RoboMaster-SDK
RoboMaster-SDK copied to clipboard
Directly access TOF data?
So I'm trying to access the TOF data directly to control the movement of the bot.
I know I can subscribe to the data from the TOF sensor it its own function but how can I use that data outside the function?
I'd like to be able to run an "if [TOFDistance] < 20" situation. Is this possible?
Any news on this topic? I am facing the same problem
There are several ways to do that but none of them are actually specific to the SDK. You could, for example, write the update to a global variable and then read that anywhere in your code. Not the cleanest way to do it but the simplest one.
Any news on this topic? I am facing the same problem
You need to use subscribe function to get tof data
Sorry for the late response. Thank you for your answers. I will give it a try!