Sharp IR proximity sensor + arduino + Raspberry PI = Help

edited September 2016 in Raspberry PI

Hi everybody, I am working on a project where I have to use a IR proximity sensor that is plugged to an arduino uno, that will be plugged to a Raspberry Pi 3 B where a webcam (kinect soon) will be plug. And we would like the the webcam be triggered when the proximity sensor has a certain value. I know the code in "arduino" software to have the proximity sensor values, but I don't how to trigger webcam. I tried some loops but nothing works...

Thanks so much for your help, All the best



  • I just find this code that modify the background brightness according to the distance. But I can't trigger the webcam... Halp :/

  • edited September 2016 Answer ✓

    Finally found the solution, if it can help somebody, here the link to github to see the code to trigger the webcam with a proximity sensor (Arduino + Processing).

    int x = 200 is the value of the proximity sensor that will trigger the webcam when it reach.

    Cheers !

  • @lxnr_p Just curious about what prox sensor are you using? Do you have the specs? When you say 200, what is the meaning of that value based on the acceptance range of your sensor? Interested in the details although it is not processing related.


  • Hi, I'm using a Sharp 2Y0A21, but I don't know the pecs sorry. 200 is the value that's printed in the processing's console I made some test to know the value that corresponded to the distance I would, and it was about 200. But Actually, I don't really know the meaning of value. The most something is close to the sensor, the most the value will increase.


Sign In or Register to comment.