Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 05:24 04 Jul 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Using IR on umite.

Author Message
nglordi
Newbie

Joined: 09/01/2015
Location: United States
Posts: 4
Posted: 01:52pm 09 Jan 2015
Copy link to clipboard 
Print this post

This is my first post on this site.

I am using umite MKII as a robot controller. I would like to use the IR command, but could not get it to work. I checked the IR sensor & remote controller as well as all connections. There seems to be no problem. The IR command does function in the bacKground. However, the command Print Pin(16) gives an error message - Pin 16 is not configured as an input.

My understanding is that the IR command is supposed to configure pin 16 as an input.

Nick
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9586
Posted: 02:30pm 09 Jan 2015
Copy link to clipboard 
Print this post

Hi - welcome to the forums.

The IR command does configure the pin, but you have to use the interrupt to print out the value. Simply printing pin 16 as you are trying to do, will not work - but you have already discovered that!

Have you tried the simple test code on page 16 of the manual?

This demonstrates how the interrupt works to re-direct your program when an IR command is detected.
Smoke makes things work. When the smoke gets out, it stops!
 
nglordi
Newbie

Joined: 09/01/2015
Location: United States
Posts: 4
Posted: 03:44pm 09 Jan 2015
Copy link to clipboard 
Print this post

Thanks for the reply - but I did run the test code on p. 16. There was no response to the remote.

Nick
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9586
Posted: 03:55pm 09 Jan 2015
Copy link to clipboard 
Print this post

Have you tried a different remote? The IR function can read many remote codes, but certainly not all of them. If you are not even getting a response from the demo code on page 16, then I think we have a case of remote incompatibility perhaps. That, or the IR receiver is faulty or not for the correct modulation frequency.

Other members here will chime in with their thoughts, no doubt.

You do have to be using a remote whose modulation protocol is supported, to be able to use the IR function, and if you are using something that is not supported(perhaps with it's own somewhat unique protocol or something), you will get no results.

C'est La. Vie......

Are you able to tell us/link us to the remote and receiver you are using, so myself and others here can check them for compatibility for you?
Smoke makes things work. When the smoke gets out, it stops!
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2932
Posted: 11:11pm 09 Jan 2015
Copy link to clipboard 
Print this post

Hi Nick,

As Grogster says, please state which IR receiver part you are using; and also the make/model of the IR transmitter (and maybe a picture too).

The example code to try can be modified slightly to confirm if any 'interrupt' is indeed triggered (without trying to interpret which button is actually pressed). Have the MicroMite connected to a console program while running (i.e. TeraTerm):


IR DevCode, KeyCode, IR_Int
DO
print "waiting . . . "
pause 100
LOOP

IR_Int:
PRINT "*** IR Detected ***"
IRETURN


As Grogsteralso says, I strongly suspect that if all your connections are correct and you get no response to the above code then the IR Transmitter is of the incorrect protocol (the inbuilt IR function requires a particular Sony protocol). Most (but not all) transmitters use either a Sony protocol or an NEC protocol.

There is example code that you can use if you have an NEC protocol Transmitter - but as mentioned above it doesn't use the inbuilt IR command.

Let us know how you get on . . .

WW
 
nglordi
Newbie

Joined: 09/01/2015
Location: United States
Posts: 4
Posted: 03:05pm 10 Jan 2015
Copy link to clipboard 
Print this post

Problem solved.

I had changed batteries in the remote and forgot to reprogram it.

Nick
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9586
Posted: 03:16pm 10 Jan 2015
Copy link to clipboard 
Print this post

Good work. Have fun.

Some remotes remember their codes, but your one obviously did not.
Smoke makes things work. When the smoke gets out, it stops!
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025