Python Ultrasonic Test and the EV3 Ultrasonic Sensor


Hello All,
I am having problems with running the Python Ultrasonic Sensor test ( with the EV3 Ultrasonic Sensor. It always returns a zero. I am running it with the Dexter Industries SD card image (2013.07.27_BrickPi_weezy_flavor) and the 9v battery pack in conjunction with USB power. Anyone have any suggestions? Any information that you can give me will be greatly appreciated. Thank you for your time.


When I tested the normal ultrasonic, I was getting 0 because the test (unless you change it) is set for port 1.

Also make sure you have in the same folder as the Ultrasonic Test.


Hello Ostrich,
Thank you for taking the time to reply to my post. I did have the EV3 Ultrasonic sensor plugged into sensor port 1 but I did not have in the same folder. I did not get an error when I ran the program, i.e. the line, from BrickPi import *, seems to execute ok.

 Can you confirm that you are using the EV3 Ultrasonic sensor and not the NXT Ultrasonic sensor?  Thank you for your time......


The EV3 sensors do not work with the NXT or the BrickPi. The digital EV3 sensors (including the EV3 Ultrasonic sensor) use a serial protocol not supported by the NXT or the BrickPi.


Hey John,
I just want to back up what Matt’s saying: none of the EV3 sensors are currently supported with the BrickPi. The motors are though. Here’s a quick link we put up about it:

Is there a way you can try with the ultrasonic sensor for the NXT?