Detect distance using a Range finder

Language: python micropython | Level: Beginner


Here is an example program that uses the Range_Finder class. In this example GPIO pin 1 is connected to the Echo Pin on the range finder, and GPIO pin 2 is connected to the Trigger Pin.

sensor = Range_Finder(echo_pin=1, trigger_pin=2)

distance =

Did you find this content useful?

If you found this high quality content useful please consider supporting my work, so I can continue to create more content for you.

I give away all my content for free: Weekly video content on YouTube, 3d Printable designs, Programs and Code, Reviews and Project write-ups, but 98% of visitors don't give back, they simply read/watch, download and go. If everyone who reads or watches my content, who likes it, helps fund it just a little, my future would be more secure for years to come. A price of a cup of coffee is all I ask.

There are a couple of ways you can support my work financially:

If you can't afford to provide any financial support, you can also help me grow my influence by doing the following:

Thank you again for your support and helping me grow my hobby into a business I can sustain.
- Kevin McAleer