Let's Make Robots!

Question IRIN Command Picaxe

I am using the irin command right now and am running into a really simple problem...

It goes: irin [timeout,address],pin,var 

The timeout is how long you want it to wait before skipping ahead to the address and the pin and variable are pretty self-explanitory. What I want to know is, what address do I use if I want it to just go to the next line of code? I don't need it to go to a whole other place in the code, just the next line. --Any thoughts?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
In assembler the next address after the current one is $+1. I don't know if $ exists in BASIC, so it probably won't work, but might be worth a go. Internally, I have no idea what the BASIC command compiles to, so there's really no telling.

I have used the "ugly" address line (in the next line) but the IRIN code is in a gosub loop -probably will work but I am a little worried.

And Frits- if you omit the [timeout,address] part it will not skip ahead until it gets a signal. It will just sit there and wait... forever! BTW IRIN is the only IR command that will do this, all the other IR "IN" codes wait until a signal is recieved before it will continue with the rest of the code.

it's also only specific to the 28/40X series. The 18x and lower all get stuck with the infrainX. There are some ways to keep them mostly out of locked receive loop though they take up some memory space to implement...
include those brackets in the actual code. That would hopefully raise a syntax error message.
[timeout,address] can be omitted, that's what it means when it is written like that :)


just make up an address, right after your irin line? seems ugly, but maybe you don't care?