Addressable commands using IRIN/OUT

Tvmender

Active member
Hi All

I am still tinkering with IROUT and IRIN using the flowchart programming method. I am still learning the coding side of things, relatively new to PICAXE.

I have a project where I need to send an initial set of parameters to a PICAXE to set up different options etc. The current way I am doing this is by creating an "index system" where the initial information received by the PICAXE is the command index then the value of that setting followed by a command end instruction as follows:

First value sent/received in IRIN is the instruction address i.e. 122 = "SET TIMER VALUE"
<PICAXE looks up that command in the index and stores next value in that location i.e. VarB>
Second value sent/received is the numeric value required i.e. 10 (relates to minutes)
<PICAXE stores value>
Last value is the command end instruction i.e. 122 again to indicate that command value setting is complete.

I then repeat this for around 10 more values (all less than 100 so no issues with running or duplicating numbers).

Is this an acceptable way of doing things or is there a more efficient way? It works ok at the moment. I am stuck to using flowcharts at the moment.

Thanks!
 
Top