Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 6 months ago.
Trying to connect MB7389 ultrasonic sensor via PWM
Hi,
I'm trying to connect one of these ultrasonic sensors:
http://www.maxbotix.com/Ultrasonic_Sensors/MB7389.htm http://www.maxbotix.com/documents/HRXL-MaxSonar-WR_Datasheet.pdf
via its PWM interface and not getting any values reading via pwm. something like:
PwmOut ultraSonic(PB_0);
ultraSonic.write(1);fire read
wait_us(100);
float reading = ultraSonic.read(); get reading
logInfo("reading: %4.5f", reading);
Any idea what I'm doing wrong?