Ultrasonic Sensor 2 always returning 300



The ultrasonic sensor always returns 300, even if I hold my hand in front of it at different distances.
I have already tightened cables and also replaced them. I updated the firmware of the cyberpi via mBlock 5.4.0 and also updated directly on the mBot.
The obstacle avoidance demo program is also no longer working, it just drives into the wall.
The mBot 2 is just 3 days old. Please help!


The ultrasonic sensor might be broken :frowning:


Is your ultrasonic sensor plugged in to the cyberpi’s mBuild port? Also, make sure that you are using the correct ultrasonic sensor and its extension.
This one:
Not this one:

Thanks for your time,


The sensor was plugged into the mBot2 board (right side in the front). I just tried the port directly on the cyberpi, but without success. It also only returns 300.
I am using the ultrasonic sensor 2 and the corresponding extension.

Thank you! :slight_smile:


When you plug in the sensor, do the rings around the sensors light up blue? I’ve got a bad mBuild wire before, and the senors will light up blue unless the wire is bad, the mBuild port is bad, or the ultrasonic sensor is bad.
If none of that determines anything, please give me further details and mention me as @Best_codes.

Thanks for your time,


Yes, the rings light up blue.
I have contacted the seller in the meantime and will get a replacement sent.
Thanks anyway for your help @Best_code!.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.