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

[driver] Add driver for Ultrasonic ranging module #47

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

kevalpatel2106
Copy link

I have added driver for the ultrasonic ranging module to measure the distance of the object from the sensor. I have tested this driver using HC-SR04 ultrasonic sensor. It has simple implementation and a callback listener to get the distance value in centimeters.

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@kevalpatel2106
Copy link
Author

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

@kevalpatel2106
Copy link
Author

Any plans to merge this PR?

@mangini
Copy link
Contributor

mangini commented Jul 6, 2017

@kevalpatel2106 , thanks for the PR. Are you getting reliable measurements using this driver? Android Things is not a real time OS, so there's no guarantee that a timing-sensitive protocol like the one in HCSR04 wouldn't be affected by competing threads/processes. We are working on a solution for it, and when we have it, we will work with you to review and add your driver to the official library. How does that sound?

@kevalpatel2106
Copy link
Author

@mangini That sounds good. I am getting almost up to 4-5 cm accuracy with this driver. I am using it one of my DIY Robocar projects. To make it real time, I am spinning two different threads. One to send the pulses and another to get the echoes.

@mangini
Copy link
Contributor

mangini commented Jul 10, 2017

Great. You can define different thread priority, but it still won't be real time. I will keep this PR open until we have a better way of doing it.

@Fleker
Copy link
Contributor

Fleker commented Jul 23, 2018

Good morning,
We've recently added a program to let developers submit drivers from their own repository to androidthings.withgoogle.com. Can you put this change in your own repository and then submit through that site?

@kevalpatel2106
Copy link
Author

@Fleker Sure I will do it.

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

Successfully merging this pull request may close these issues.

4 participants