I cannot find much on the internet for 500BP 416 , do you have the exact part number and/or a link to the datasheet of the parts you have in mind? What is your use case?
using motion sensors with bela
the gp2y0a21yk has an analog output so it should be enough to power it from Bela and connect its analog out to one of the analog inputs, then it can be read from Pd with one of adc~ 3 through 8. I remember using something similar to this in the past and it was inducing a lot of noise into the rest of the circuit. This was on a Bela (not BelaMini) and the issue was resolved by plugging the ground wire for the sensor into P8.01 instead of the more common P9.01 pins. For BelaMini one would have to try all the available ground points to find the optimal one.
The RCWL-0516 seems to have a logic output, high or low depending on whether movement is detected (it's a motion sensor, it does not measure distance from what I can tell). If that's what you need , then you should be able to simply connect the TRIG output to a Bela digital input and read it in Pd with one of [r Bela_digitalIn]
, after setting up the input with [s Bela_setDigital]
, as per the PureData/Digital
example
the datasheet you provided says that the output is 3.3V. If you have reasons not to trust it, place a 2k2 series resistor before going into Bela to protect it from over current. If this results in too small a voltage to reliably trigger a "HIGH" on the Bela side, you may have to look into more sophisticated level shifting involving e.g.: a transistor.
(for some reasons my account was deleted and and so my original post and responses vanished. I don't know the reason but I'm still going to update this thread once I'll get to satisfactory results. Current setup involves 2 ultrasonic sensors, 2 LDR, 1 radar and 1 infrared sensor. I'm currently calibrating them for what I can, keeping in mind what you said about the noisiness caused by the infrared sensor. I don't need extremely precise values but I want to make sure there is as less noise as possible, since so far I've had troubles getting a clear signal from this setup and kinda any other setup involving the ultrasonic sensors. Anyway, I'll post some updates soon!)
sorry about the cancelled user, I have been deleting some spambots and maybe by mistake I deleted your account as well?
Looking forward to your updates!