Ultrasonic work for anyone?


#1

The ultrasonic sensor on our mBots doesn’t seem to do anything, or at least not anything I can figure out. The avoidance mode out-of-the-box resulted in direct wall crashing. And I can’t figure out how to program it usefully in the mBlock language. It would certainly be nice to have a control block which would trigger when an obstacle is close.

What have the rest of you done?


#2

Hello

You can try to upgrade firmware and use original firmware to achieve the obstacle avoidance function. We are fixing the bugs of programming ultrasoic sensor function. Sorry for that!

Thanks


#3

Thanks! Do you have a link to the upgraded firmware, and instructions on how to install it?


#4

I had the same behavior when unboxing my mBot.

After I had installed a newer version of mBlocks, and could use the menu entries for “Upgrade Firmware” and “Restore Default Program”, which finally made it run for me. See also our other discussion thread, especially Aaron’s post.


#5

Hello

The latest version of mBlock 2.2.0 has released on http://mblock.cc/download/
the ultrasoic problem has fixed, please update!

Thanks!


#6

I find that the ultrasonic sensor on my mbot stops working when the cardboard face plate is in place, if that’s helpful at all? I also find the readings very noisy in all conditions but averaging about 5 readings improves matters.


#7

Thanks for that tip Colin, about averaging the 5 readings. That’s a good idea, I’ll give that a try in the code I’m writing now.


#8

I have a sample program here that does sampling and an output to the led matrix
distance_slide_picture_multi_sample_button_adjust.sb2 (73.6 KB)


Mblockly app
#9