Upload to mBot via mBlock_v3.1


#1

Hello! New to the forum. Searched everywhere for info on troubleshooting this, and came up empty. So here goes…

Running mBlock 3.1 under OSX Yosemite. I have mBot with Bluetooth. mBlock successfully connects to the mBot in Arduino mode using the tty.Makeblock-ELESTPP serial connection.

I made a simple program with Scratch: “mBot Program,” then “Run forward at speed 100.” I then click the “Upload to Arduino” button in the right-hand panel with the Arduino code. It appears to be uploading for several seconds, but ends with “Upload failed.” The end of the log shows this:

     *Using Port                    : /dev/tty.Makeblock-ELETSPP*
     *Using Programmer              : arduino*
     *Overriding Baud Rate          : 115200*

avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding

avrdude done. Thank you.

What are these messages telling me?


#2

I had the same problem when connected over Bluetooth. I think it is not possible to upload a program over Bluetooth. I re-connected via the USB cable and then I was able to upload just fine. Hope this helps!


#3

I’m sorry, I was not clear enough. I have the mBot with Bluetooth, as opposed to the mBot with 2.4G, but I am using a USB cable to connect the robot to the computer. My understanding is that Bluetooth can only be used to control the robot in real time with the mBot app.

I do have some additional information. If there’s one thing I hate about forums, it’s when somebody starts a topic, like I did, and then comes back and says “I solved my problem!” and doesn’t share the solution. So I’m going to share my solution, or at least what I know.

After beating my head against a wall with my MacBook Pro, I changed to a different computer. I have a second MacBook Pro for work, so I installed mBlock on that machine. When I installed the drivers on the other machine and connected the mBot, the serial port’s name was “/dev/tty.wchusbserial1410” instead of “/dev/tty.Makeblock-ELETSPP”.

The wchusbserial1410 connection worked just fine. My son wrote a Scratch program, and uploaded it successfully, and it started running on the robot.

It would be helpful if somebody knows how to get the wchusbserial1410 connection for my personal MacBook. Neither driver file on the GitHub site appears to provide it, and I would like to get this working on my own computer.

Since my last post, I have upgraded to mBlock 3.2, and I have upgraded my OSX to El Capitan.


#4

I have the same problem…


#5

Your port selection shows that you are connected via the Bluetooth serial port (/dev/tty.Makeblock-ELETSPP*). You need to disconnect from that serial port, connect the USB cable, turn on the mBot, then look for the USB serial port (/dev/tty.wchusbserial410) and connect with that one.

The error you are seeing occurs because you cannot upload a program via Bluetooth or WiFi. You have to be connected via the USB cable to use the avrdude programmer on the mBot.

Hope this helps.