Programming Remote


#1

I am a real newbie so please excuse me but I have looked in the forum already. :slight_smile:

What I would like to do is make a simple program and set it to either the D, E or F button on the remote.

As a added extra would it be possible for the A, B and C modes to work still or can I have only my program or the default program, not both? If I wanted A, B, C and my program to work, would I need to actually program A, B and C modes in myself so everything was combined?

I hope this makes sense. Thank you to anyone who can help me.


#2

Any program that you upload to the mBot will overwrite the memory, so you cannot have the default program and your program running at the same time. See this thread for a discussion on programming for the IR Remote.


#3

Thank you Chuck. So if I wanted to attach the code I would put

if ((ir remote Greater than symbol D Less than symbol pressed))
Do the processing for the selected commands here
else
What would I put in here if I wanted it to do nothing? Would I leave it blank?

Thank you so much for your help.


#4

More like:

set [value] to (ir remote)
if ((value = A) or (value = B) or (value = C) or (value = D))
    if (value = A)
        [Do the A function stuff here]
    if (value = B)
        [Do the B function stuff here]
    if (value = C)
        [Do the C function stuff here]
    if (value = D)
        [Do the D function stuff here]

That way you are immediately filtering to determine if you want to do anything with the value. If not, the code will cycle through to the next iteration of the loop.


#5

Thank you very much for your help. I certainly appreciate it.


#6

No worries, I published an ebook with a several example programs and one covers remote programming. The link for it is here if you are interested. The proceeds go to fund kids robotic programs here.


#7