Can't reprogram remote control


#1

Hi,

I can program the robot to move using the keys on the keyboard ( “key space pressed”) but when I use the same program and substitute ir controls instead (“ir remote A pressed”) it doesn’t work. It comes back on the pre-programmed stuff instead, to move the robot with the remote control. What can I do?

thanks
Laurent


Remote Control does not work?
Remote can't be programmed
#2

you have to upload using the USB cable. that is the only thing that will actually upload the code for running remotely.


#3

Thanks,

my problem is not to have the code run remotely. I can control mbot with the arrow keys of the keyboard of my mac by bluetooth, no cable. The issue is to use the ir remote controller for my own programs. When I use it, and press the key A for example, it comes back directly on the pre-loaded program to control the robot remotely manually, rather than doing what I told in my porgram when I press the key A on the remote controller. The same program works for exemple if I use the keys of my keyboard. Seems like default programs in mbot have precedence on my programs.
Any idea?


#4

Laurent-

What danjger posted is correct. If you want to change any part of how the mBot functions while un-tethered, you need to use the USB cable to upload a modified program.

I wrote a description of this split for the 2.4g serial version, and I think the Bluetooth version works similarly.

The default mBot program controls the Bluetooth connection and it also runs the event handlers for IR remote. So to modify how the mBot responds to the remote control, you need to upload a modified program with the USB cable.

I haven’t tried putting IR Remote handlers into a mBlock program, but it makes sense that the default mBot program would take precedence over the mBlock commands.

–andrew


#5

Andrew,

what I’ve seen in mblock is that it’s not uploading anything at all to the card.

If I disconnect the usb cable it still says connected. I can even upload to the bot! The scratch interface will tell me "Upload finish…100%"
If I remove the bluetooth card, connection is lost, I can never connect to the com port /dev/tty.Makeblock-ELETSPP even with the usb cable connected of course
If turn off the robot, put back the bluetooth card, , disconnect the cable , choose connect>serial port>dev/tty.Makeblock-ELETSPP , guess what : mblock interface tells me serial port connected!

But if I try to upload the file through the Arduino IDE it says all the time, for any example in there, "Can’t open device “/dev/cu.Makeblock-ELETSPP”: Resource busy
ioctl(“TIOCMGET”): Inappropriate ioctl for device

And I also tried to upload the simple blink example through Arduino IDE, it doesn’t work either.


#6

make sure you are selecting the USB serial.
I’ve had to try a few times sometime for the item to show up.
Make sure you have reviewed this thread


#7

Hi Danjger,

thanks to your post I understood I had not installed the driver for the serial port using the sudo command. I thought I was using a serial USB port with “dev/cu.Makeblock-ELETSPP” because the two other ones were called “bluetooth” but this one was also a bluetooth one! Now after correct installation I do have a port “dev/tty.wchusbserialfd130” that enables me to really upload the program and so use the remote control.
Loading through Arduino IDE works as well!

Thanks again to you and Andrew, you have been of great help and I hope my kids will enjoy the challenge as l much as I do.

bye for now


#8

Here is the hidden trick I use, not sure if there is a better way but I use the “Update Firmware” option with the USB cable to REMOVE the default program, then the use of bluetooth control and response will work without being intercepted by the loaded program. Bear in mind that since the computer is only communicating through the serial interface the response times of both sending command and monitoring value is much slower but it does work.


#9

Has anyone tried out to fill the (vacant i presume) D, E and F presets on the IR remote?
I would like the A, B and C presets as they are at the moment and fill D, E and F with my own programs. I have tried using the ‘IR remote … pressed’ block, but sadly that doesn’t work.
The only way to execute my programs is doubleclicking the mBot-program in mBlock, but it overwrites the A-preset. This is temporary, when i deactivate the mBot program, the original program returns to the A-preset.


#10

So the problem really comes from trying to add scratch code to an arduino program. The “demo program” is not written in scratch and so you can’t add scratch code without opening up the compiler and merging them yourself in c++.
I am slowly working on replicating the “Default Program” over here


You have to completely remove the “Default Program” first.


#11

Hi Danjger,

That explains it. I really appreciate your effort to translate the default mBot programs to scratch, as you did with the A-program already. The B-program will be quite a challenge i think. Goodluck, i can’t wait to try it out.
The ability to have the makeblock-stuff driven by scratch is by far the most appealing aspect.


#12

Hello everyone,

i c’ant find the code for the up arrow on my Remote Control (IR).

i’m using the robot starter kit (IR version)(Meorion)

Can someone help me?

Thanks already!


#13

Hi Noryc_126,

You may refer to this post.