-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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 for HC-SR04 #865
Comments
Like already mentioned, firmata is not best suitable because "pulsIn". I just add some issues as reference: |
Hi @Juan1ll0 , please could you provide your new driver (with an example) by a Draft-PR to dev-branch. So maybe we can find a solution. |
|
Sorry it doesn't work the code only compiles. I try to transform code like structs, pins and similar but it doesn't work. For example the mentioned project used github.com/stianeikeland/go-rpio/v4 and I transform pins to DirectPinDriver gobot implementation and similar things. The code I worte implent the gobot interface Driver like this guide explain https://gobot.io/documentation/guides/adding-hardware-support/ and you can do: |
@Juan1ll0 please create a branch with your code and file a Draft-PR or add the files here (e.g. as zip) and I can do that. |
OK. I'll do it |
You've got at https://github.com/hybridgroup/gobot/pull/872. Sorry about my code but i'm not an experto on go. Than you by your interest. |
Ok, could you please describe:
|
I use a raspberry pi 4 with Raspian, with Gobot 1.16 and Go 1.18. Adaptor: raspi I thought the problem is on function StartDistanceMonitor or in getPinStateChangeTime i will continue investigating. |
@Juan1ll0 please see my remarks in PR. |
available since v2.2.0 |
Hi guys,
I'm writing some code with Gobot for an IOT device that need to measure a water tank level. I'm think that using an HC-SR04 is a good option but i find that Gobot doesn't have support for this sensor. I found library at https://github.com/raspberrypi-go-drivers/hcsr04 that works fine. I know that this sensor can not be used under "firmata" adaptor because of "pulseIn" function is not implemented, but with another adaptor like "raspi" Can I found any solution?. Is any sensor supported by Gobot similar to this?
I'm trying to write a new Gobot Driver adopting code of https://github.com/raspberrypi-go-drivers/hcsr04 to gobot using a "DirectPinDriver" but doesn't work. Can somebody tell me if is posible?
The text was updated successfully, but these errors were encountered: