Count duration a GPIO is high (or low) ? [closed]

asked 2019-03-22 07:04:16 -0500

Jason C. gravatar image


I'm using a Beaglebone black micro-controller with ROS (melodic, code in rospy) and Adafruit library installed. Is there any way to receive the exact duration is ns/us/secs a GPIO is high? Currently, I want this feature so I can accurately convert a signal beaglebone receives from a sonar sensor, into distance.

Thanks in advance,

Jason C.

edit retag flag offensive reopen merge delete

Closed for the following reason question is off-topic or not relevant. Please see for more details. by gvdhoorn
close date 2019-03-22 07:37:34.245837


I'm sorry, but this does not seem like a ROS question. It's more a low-level GPIO interfacing issue.

As such, I would suggest to post this on a more appropriate forum, such as those dealing with embedded programming.

gvdhoorn gravatar image gvdhoorn  ( 2019-03-22 07:38:59 -0500 )edit