grahamfleming
Posts: 2
Joined: Wed Dec 04, 2013 9:07 pm

Ultrasonic sensor - trigger take picture

Thu Dec 12, 2019 7:58 pm

Hi

I have an ultrasonic sensor, a raspberry pi, and a rpi camera on a robot car.

was hoping to have the camera take a picture and save it to a folder when a certain distance is calculated.

My question is how can I trigger the camera to take a picture and save it to a folder, after the ultrasonic sensor detects an obstacle?

Thanks!

I found this article on calculating distance with the ultrasonic sensor as well

https://tutorials-raspberrypi.com/raspb ... r-hc-sr04/

ultrasonic sensor
https://www.sparkfun.com/products/15569

mattmiller
Posts: 2230
Joined: Thu Feb 05, 2015 11:25 pm

Re: Ultrasonic sensor - trigger take picture

Thu Dec 12, 2019 8:31 pm

There is a lot of example out on t'internet but maybe best way is to use a library to do the work for you as it deals with a lot of issues that can arise if you roll your own code

https://pypi.org/project/Bluetin-Echo/

Return to “General discussion”