Updating mbot from Arduino IDE and keeping the bluetooth connectivity with app?


#1

I’ve started modifying the Arduino file in the “mbot_factory_firmware” directory and uploading it to the mbot. This works very well - for example, I’ve added additional modes (D, E and F) and the mbot now turns on the spot rather than the curve right/left default setting. The only slight snag is that I can now NOT control the mbot via bluetooth from the MakeBlock app anymore. It connects at first but then it says “unrecognizable firmware”.

I have tried a couple of things but no success so far. In this context, it is unclear to me what the difference between “firmware” and “default program” is in the mblock software?? When I upload a sketch from the Arduino IDE, do I replace both??

I would be very grateful for some advice!! :slight_smile:


#2

@chris2020,

The firmware is the “system” code that tells the board what to do when the power is turned on. It is not a good idea to play with this code file.

The default program is the “demonstration” program that lets you do things right out of the box.

I would suggest that you re-install your mBlock software, so you can reset the firmware.

Good Luck.

Mike


#3

Thanks a lot Mike. The basic problem I am trying to solve is that whenever you upload a program to the mbot (either from Arduino IDE or mBlock) the bluetooth connectivity with the app on the iphone is lost. The error message is “unrecognizable firmware”. The uploaded programs work perfectly, but it would be just nice to keep the bluetooth connectivity with the app. This must be possible in my mind, using the default firmware and default program, everything works perfectly. I think the problem must somehow be that whenever you upload a new program, it doesn’t upload an adequate number for the firmware version?? Do you know how to get around this problem??
Best, Chris


#4

Hi Chris2020,

Both the “firmware” and the “default program” implement the Firmata protocol. If you make any changes to the firmware, make sure you don’t change anything related to Firmata.

Happy New Year!
Aram


#5

Dear all,

Thanks a lot for your comments!! Turns out that I have made a stupid mistake. :frowning: In order to use the serial monitor in the Arduino IDE, I had to set the baud rate to 9600 (“Serial.begin(9600)”). Due to this, I have lost the bluetooth connectivity with the iphone app. I have now put back the original value (Serial.begin(115200)). My updated Arduino program works well now AND I can still use the app on my iphone! Yeah!

Happy new year as well!!

Best, Christoph


#6