Skip to content

rhubarbdog/pyboard-hcsr04

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Distance measuring with HCSR04



Files pin_hcrs04.py and spi_hcrs04.py both contain the single class HCSR04. This has one method .distance_mm() . pin_hcrs04.py can use any 2 pins where as spi_hcrs04.py can only use pin X7 echo and X8 trigger in position 1 and pin Y7 echo and Y8 trigger in position 2.

The HCSR04 is a 5 volt device you need to use a logic level shifter. Or you can trigger the device with 3.3v and using a voltage divider on the echo circuit. see http://www.raspberrypi-spy.co.uk/2012/12/ultrasonic-distance-measurement-using-python-part-1/

About

Measuring distance with the pyboard and HCSR04

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages