[SOLVED] mBot Neo Sensors are not Lighting Up (Connection Issue?)


#1

I’ve assembled my new mbot2 and tried building the obstacle avoidance program in this tutorial, but when I run the program the bot just runs forward and crashes into whatever’s in front of it.

Doing some debugging by displaying the ultrasonic distance on the screen shows that it’s always 0.0.

The LEDs around the ultrasonic sensors and on the line sensor aren’t lit. From clicking around it sounds like that means that they’re not connected correctly. Checking that they were wired up right, I realised that there’s a difference between the build animations in the makeblock app and the diagrams in the quick-start booklet.

The booklet has the connectors going from:
mbot2 shield mbuild port -> right port of ultrasonic sensor
left port of ultrasonic sensor -> left port of line sensor

The build animations in the makeblock app show the connectors going from:
mbuild port -> left port of line sensor
right port of line sensor -> left port of ultrasonic sensor

I’ve tried both, the leds haven’t lit up in either configuration. Can anyone tell me which is right? Could either one work?

The app says that the cyperpi firmware is up to date. Is there anything else I can try?

Thanks!


#2

Hi @babbageclunk, can you try to upload a code from the online version (https://ide.mblock.cc) or the PC version? The app can be buggy sometimes.

Your code should look something like this to start with (very simple, for debugging purposes):
image

If the doesn’t work, then check and make sure that the Ultrasonic sensor is lighting up blue when you turn on your mBot Neo, so that we can tell if the issue is with the code or the wiring. It does not matter whether you connect the mBuild cables to the right or left side of the sensors, as long as the cable is also connected to another sensor or directly to the mBot Neo. (One sensor should be connected to the mBot Neo, and the other sensor to that sensor).


#3

Following up on my own post here…

The Ultrasonic sensors don’t always light up, but the line following sensor should! If neither does, then follow these steps:

  1. Connect the ultrasonic sensor directly to the mBot Neo.

  2. Write and upload this code:
    image

  3. If the ultrasonic sensor does not light up, then try it with each of your other cables. If none of them work, it’s likely a problem with the mBot Neo board, connection, etc.

Let me know what happens!


#4

Ok, that’s great to know thanks! I’ll try just with the ultrasonic sensor and report back.


#5

I worked it out - when I first put it together I’d used the 10cm cable to connect the sensor to the mbot2 shield, but I found it really short and difficult to get it into the port.
Looking closely I could see that I’d bent one of the pins!

I used a small screwdriver to get it straight and now both sensors are working.

Thanks for your help!


#6

@babbageclunk Glad everything is working now! Happy coding! :smiley:


#7

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