I need a sample code for using the Bluetooth Remote Controller w/ mBot 2


#1

hello all, can anyone please post the correct sample code for the remote control progrm using the makeblock bluetooth remote controller.
in the old mbot v1 i had the 'i/r remote if button ‘up arrow’ pressed then do so and so…

with the mbot 2 and the new makeblock controller, i cannt seem to make it work at all.
thx


Newbie question mbot2 to bluetooth controller connection
#2

@magicmarc I don’t have the controller, but I’ll see if I can guess anything for you from the docs…


#3

thanks, yes, as im totally confused, the old mbot i/r remote commands were simple… im surprised makeblock doesnt have a simple sample remote control program using the bluetooth remote control they sell.


#4

and y’all already sent me alot of details about the bluetooth controller, about the different ways to program the buttons, etc… but its the mblock code that im confused with even more.


#5

It seems fairly simple.

Go here:
https://ide.mblock.cc/
Add the cyberpi device:
image
Add the controller extension:
image

Then, I assume, @magicmarc, that the code would look something like this:

Let me know if you had something else in mind.


#6

THANK YOU, ill try this tomorrow!
mm


#7

No problem! Let me know if you need anything else. :slight_smile:
@magicmarc


#8

thanks, however for some reason im haveing errors uploading, it just freezes at this point (im connected usb, mbot2 is powered on and charged, ive tried diffeent usb ports. https://www.dropbox.com/scl/fi/hlniaorss89hi9xfjs9kg/upload-error.jpg?rlkey=25pq5wbul71ltfaih4pwh8g75&dl=0upload%20error


#9

@magicmarc With no compiler issues, this is likely a software issue and not a code issue. Try restarting your mBot, connecting to other ports (which you did), and using different IDEs (e.g., https://ide.mblock.cc, PC version, https://ide-chrome.mblock.cc/ Beta, etc.).

Let me know if you can find out anything.


#10

im on it, THANKS AS ALWAYS! what are ide’s by the way…? when you say try different ide’s?
m


#11

ahhh, ide, integrated develpoment enviromnet… i think last time, last semester i was using the mblock app… thisis a website… ill try the other,…


#12

Yep. :slight_smile: I basically meant to ask whether you are using Web, App, what version, etc.


#13

id ‘been’ using the app version, and trying it all now, different ports same thing, which ‘of the icons on the left’ should i be coding the blocks on, see image.
upload%20error


#14

@magicmarc Can you send a full screenshot of your mBlock app? I can’t see everything there. :slight_smile:


#15

here is a link to a dropbox file, as i think the screenshot of the entire screen isnt showing the whole image…https://www.dropbox.com/scl/fi/f89ngw0hzu78jp35j9hw3/upload-error.jpg?rlkey=xrw3yy20c7z7zpwnlvclsrbue&dl=0


#16

@magicmarc Let me get back to you on this. It might be an mBlock bug or something. I’ll see if I can try it with my own mBot Neo today. :+1:


#17

im gonna try it friday at my home system too.


#18

@magicmarc Let me know how it goes. I’m waiting for an mBlock personnel that I know to respond…


#19

im also going to try it on our chromeboxes tomorrow, i know the chromebox mblock talks to the older mbots properly, as i used them last semester (because i couldnt figure out the line follower on the new mbot2!), so i was using my old mbots for the 3 (of 3 projects) the line follower, remote control and obstacle avoidance… but with new one, i find i harder to do the line follow , i havent figured it out yet.


#20

its friday, i just tried to upload at home on my home pc, i used the v5.4 windows program, and program uploaded quickly and remoteworked… so its something o n my classroom windows laptop, ill try reinstlaling the program, latest… as well as make sure it connected, etc…
thanks as always!