Ultrasonic sensor
Opened this issue · 4 comments
MrDMurray commented
Need to get the ultrasonic sensor up. Anyone want to have a go at it?
dobrienSTJ commented
dobrienSTJ commented
Code: http://www.raspberrypi-spy.co.uk/archive/python/ultrasonic_1.py
Basically, the code goes as follows:
- Imports for Sensors/GPIO
- Setting up GPIO ports as Trigger (out) and Echo (In) which basically is the sensor sending out a signal, it bouncing back and then depending on how long the signal was active until it was picked up again, measure the distance
- Calculating distance by triggering ultrasonic sensor and picking it up again with echo. The sensor is seto false and time has been imported.
I will create some simple code as soon as possible
Infrared code: https://github.com/STJRush/alpha1/blob/master/ultrapi.py
dobrienSTJ commented
Hardware:
Breaker Board
Ultrasonic Sensor
Male to Female Cables/Wires
MrDMurray commented
Nice one! I wrote some code for a speed gun here:
https://github.com/STJRush/rpi/blob/master/ultra.py