BrickPi and generic arduino US sensor

Hello,
I am a newbie; I got a BrickPi in 2019/20 (I think at least - and it says on the acrylic case “BrickPi3 v1.0”) and only now that my children are starting to experiment with ev3 and NXT I am looking into BrickPi. Programming languages we will be working with - Python and C.

My question is - can I get an ultrasonic sensor HC-SR04 to work with BrickPi and if so - what is the most straightforward way? [maybe some examples somewhere]

I suppose Connecting the EV3 and the Arduino - Dexter Industries indicates that this should be even easier than trying to get ev3 to use the sensor, but aby pointers or examples would be much appreciated.

1 Like

Thanks very much, getting these now. Would you know if there is any example code / project using this?

2 Likes

Acck - I have confused BrickPi3 with GrovePi - I am truly embarrassed and sorry.

The sensor I mentioned is for the GrovePi and does not connect directly to the BrickPi3.

Hopefully a BrickPi3 user will respond to your question soon.

1 Like

The BrickPi3 has one I2C grove connector. I do not know if Seeed has an I2C ultrasonic sensor by now. Most users will use the EV3 distance sensor with the Brickpi.

That said, you can connect an ultrasonic sensor to the Pi pins, bypassing the BrickPi connectors.

See this tutorial:

3 Likes

The linked post below tells what GPIO pins are unused. Make sure you pay attention to include the level changing resistors if you connect the HC-SR04!

You can use any of the GPIO that the BrickPi3 does not use. This includes GP4, 8, 17, 22, 23, and 27, as well as the GPIO pins on the 40-pin header that aren’t passed through the BrickPi3.

Another “direct HC-SR04 to Raspberry Pi” tutorial is

3 Likes

Thanks very much everyone. That will give me a bit to work on. It will be slow, but I will post the results, when ready. The aim is to use a hybrid of lego and other sensors.

2 Likes