Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Directly access TOF data? #78

Open
MrCampbellDuchess opened this issue Oct 13, 2022 · 4 comments
Open

Directly access TOF data? #78

MrCampbellDuchess opened this issue Oct 13, 2022 · 4 comments

Comments

@MrCampbellDuchess
Copy link

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?

@danifuertes
Copy link

Any news on this topic? I am facing the same problem

@brunoga
Copy link

brunoga commented Jan 11, 2024

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.

@alexchenfeng
Copy link

Any news on this topic? I am facing the same problem

You need to use subscribe function to get tof data

issues/90

@danifuertes
Copy link

Sorry for the late response. Thank you for your answers. I will give it a try!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants