Basic Help Needed getting connected/programming


#1

Hello,

My son and I were working on getting the mbot setup and trying to learn some of the basics but are a bit confused.

We were able to get the usb cable connection made to the robot and get the firmware upgraded. in addition, i was able to upload a small program to the unit and have its wheels turn.

We then proceeded to try and get the wireless 2.4g module working. Disconnected usb wire, plugged in the white usb device and on the mbot the blue led on the wireless module went solid blue. seemed to have a connection. We were watching this video: https://www.youtube.com/watch?v=kiO8VYpIGsw (video seems to be using perhaps a previous version as ours does not look the same. ) but we do not have a light intensity option so in its place were trying the ultra sonic sensor in its place. We would set the program up, click the green flag and the bear would show a zero, move our hands in front of the ultra sonic sensor (eyes of the unit right?) but it would not change.

What are we doing wrong and is this wireless 2.4G truly connected and functioning? Is this what the intent of the 2.4G unit is to program the mbot without being connected with a wire?

Also, when we first tried the unit we were able to use the remote to move the unit, do the wall avoidance, etc. Did upgrading the firmware delete these as the remote functionality does not work at all even when the a, b, c buttons are selected.

Do we simply need a 6V power supply withe right end to use an external power supply as we may have one laying around? I have a 5v plug that would fit it seems. Would this work sufficiently?

Thanks and hopefully we can get around some of these simply things that he can start programming and using the unit again.

Thanks.


#2

Hello,

you need to understand the differences between Scratch Mode (online, wireless, using the green flag) and the Arduino mode (USB, offline). Check the guide pdf on this site: http://learn.makeblock.com/getting-started-programming-with-mblock/ , see page 11, but read the rest carefully too.

If you want to use the online mode again after using the Arduino mode, you need to use “Upgrade Firmware” “reset the default program” (see page 13).


#3

To use the 2.4G WiFi connection, make sure that you have reconnected via mBlock so that it can access the WiFi serial connection. The dongle and mBot will pretty much pair automatically, but that doesn’t establish a connection for mBlock.

FYI, to restore the default program for the mBot you will need to use the Reset Default Program option under the Connect menu.

I would also caution that there is a difference between running a program in the mBlock environment over the WiFi connection versus uploading a program. The former uses the green flag start block and merely sends commands over the WiFi serial connection. Uploading a program requires the mBot Program start block and will invoke the Arduino compilation environment. This operation can only be performed over a USB connection because the WiFi and Bluetooth modules do not have access to the onboard avrdude programmer that is required to load the program into the mBot’s memory.

One other point that may help with your understanding is that whenever you upload a program to the mBot (versus running one from within mBot using the green flag start block) you will overwrite whatever was there before. The mBot uses an Arduino clone which is based on the Atmel 328P microcontroller. All of the memory (2K RAM for variables, 32K RAM for programs) is on the microcontroller as compared with a single board computer that may have a separate CPU and RAM.

I released an eBook last year (link) that is designed to introduce robotic programming using the mBot and mBlock programming environment that you may or may not find useful.

Best regards,

Chuck


#4

Thanks much for the replies and I will check out both links sent. Hopefully then I will get a better understanding of how we should be proceeding here.

Last, is there any issue in me using that 5v power adapter i have with this? I see it has a few different voltages on the plastic housing so not completely certain here.


#5

The mCore board is based on the Arduino Uno and can handle 5v. I think there is a voltage limiting circuit that knocks down 6v (4 AA 1.5V batteries in series) to prevent the board from being damaged per the specs, but you can look at the schematic for the mCore board (link) to confirm or contact @tec_support. The mCore board natively takes 3.7v-6v but can provide 5v or 3.3v to a module depending on the ports and the power that they provide. You might also want to spend some time reading about the Arduino Uno on the Arduino site (link) to get a better understanding of the Arduino. Dr. Simon Monk also has an excellent series of starter books on using the Arduino and programming for it although they are aimed at using the Arduino IDE rather than Scratch/mBlock.


3.3v from mcore board
#6