Showing results for 
Search instead for 
Did you mean: 
Honored Contributor I

How GPIO could connect with the ultrasonic sensor

Hey, I am doing a project with the DE2 Board. The main device that i am going to use is the  

Ping))) ultrasonic sensor. The manual sheet is guys, you need to change XXX to www) 

First, I am not sure is the power supply go for drive the sensor? Second, which pin of the GPIO is the GND? or the GND is just an output with 0?  

BTW, i am a newbie, so i am not sure what i thought is correct, please correct me if i am wrong. 

This is my thought about using the sensor, It requires a 40Khz pulse. So, I set the pin to output and set value to 1 for 40khz period. then i set the interrupt enable, adjust the pin to input, and wait for the value 1. the last thing i need to do is calculate the distance based on the time period. 


Anyway, this is my idea about my final project, I am not sure is that too hard or too easy. 

Please help me.....
0 Kudos
1 Reply
Honored Contributor I

I am sorry, I POST THREE OF IT...PLEASE dont delete is really in a hurry! 

Thank you
0 Kudos