STJRush / rpi

Lessons on getting your Raspberry Pi to do cool stuff
9 stars 3 forks source link

Ultrasonic sensor #1

Open MrDMurray opened 7 years ago

MrDMurray commented 7 years ago

Need to get the ultrasonic sensor up. Anyone want to have a go at it?

dobrienSTJ commented 7 years ago

Tutorial: http://www.raspberrypi-spy.co.uk/2012/12/ultrasonic-distance-measurement-using-python-part-1/ Video: https://www.youtube.com/watch?v=xACy8l3LsXI

dobrienSTJ commented 7 years ago

Code: http://www.raspberrypi-spy.co.uk/archive/python/ultrasonic_1.py

Basically, the code goes as follows:

I will create some simple code as soon as possible

Infrared code: https://github.com/STJRush/alpha1/blob/master/ultrapi.py

dobrienSTJ commented 7 years ago

Hardware: Breaker Board Ultrasonic Sensor Male to Female Cables/Wires

MrDMurray commented 7 years ago

Nice one! I wrote some code for a speed gun here: https://github.com/STJRush/rpi/blob/master/ultra.py