1. IRCF360 - Commands - Quick Reference Guide


Commands can easily be sent to the IRCF360 from your robot controller or PC/MAC via the RS232 interface or any pin that can be programmed as a serial connection using software  The IRCF communicates at 9600 baud, no parity, 1 stop bit (see -> background to serial interfacing).


Commands - Quick Reference 
 Command Code Mode Name Short Description 
Demo ModeTriggers a demo mode of the 360 infrared proximity sensing routine By bridging both 'touch whisker' pins (to ground) before power-up,  the IRCF360 will trigger a demo mode where the 360 infrared proximity sensing routine (same as command 030). ASCII delimited output will be sent to the serial port with proximity information of all 8 directions.

The command is used when proximity information is required to be sent to a PC and where data is logged for analysis or displayed on an specific PC application such as a radar screen.
  
010  
BYTE1 = 10 (the command)  
BYTE2 = 0
BYTE3 = 0
BYTE4 = 0
Serial interface handshaking control commandThis command will turn on an echo of each command sent to the IRCF360 via the serial port. It acts as an acknowledgeable (ACK) to the robot controller and confirms that the IRCF360 has received the command. This is useful for certain slower micro-controllers where the baud rate may be quite slow and the command can be resent after a period of time.
011

BYTE1 = 11 (the command) 
BYTE2 = 0
BYTE3= 0
BYTE4 = 0
Circular display routine on/off  After the IRCF360 receives a command and executes the command it will return a circular display pattern known as ping-pong will be displayed. This is useful to see when a command is finished and when the IRCF360 is ready to receive a new command. However, when many commands need to be sent in succession turning the ping-pong off enables a rapid succession of commands to be sent without waiting for the ping-pong routine to finish.  
020    

BYTE1 = 20 (the command) 
BYTE2 = Button Code
BYTE3 = Device Code
BYTE4 = 0 or 255 (Freewheel)
  
Transmit Sony SIRC infrared command on all 8 IR LED's (360 degrees)  Transmits a Sony (SIRC 12-bit ) Infrared command from both IR LED’s. Any combination of device code+ button code can be transmitted. This is used for transmitting IR signals or message to other robots for gaming or swarm control or to other IR devices that can interpret Sony the 12bit SIRC standard IR messages, such as some cameras, televisions, etc.  
022

BYTE1 = 22 (the command) 
BYTE2 = Button Code
BYTE3 = Device Code
BYTE4 = An index determining which IR LED to send the message from
  
Transmit Sony SIRC infrared command on any 1 IR LED   Similar to command 020 but this command allows any one designated IR LED to send the message in one direction (rather than sending to all 8 IRLED in all directions) . Any combination of device code + button code can be transmitted. 

This command is particular useful for:
  • Robot swarms or robot gaming mode where the intensity of IR signals need to be limited. 
  • When different signal needs to be sent in different directions,  such as communication of food. e.g. on the north IR LED send a message "I found food south of this signal", while sending a different message on the east, south and west IR LED's. 
  • When probing the relative direction of other robots in the vicinity. For an IR message could be sent out to a all neighbouring robot that mean "is anyone out there?". If the robot acknowledges the message then the relative direction of that neighbouring robot can be determined. If no message is received then probe the next IR LED and so forth.  
  
023

BYTE1 = 23 (the command) 
BYTE2 = Button Code
BYTE3 = Device Code
BYTE4 = An index from 0 to 7 to determining which IR LED to send the message
  
Transmit Sony SIRC infrared command on any 1 IR LED  Similar to command 022 but will automatically repeat the command without needing to resend the command. To exit just send a new command.   
024

BYTE1 = 24 (the command) 
BYTE2 = Button Code
BYTE3 = Device Code
BYTE4 =  An index from 0 to 7 to determining which IR LED to send the message

Listen for /  Receive Sony Infrared Messages Receive Sony (SIRC) IR remote control commands and output the results to the RS232 port as two-bytes data (device code & button code) either in decimal, ascii or ascii delimited format. This is can be used for receiving IR signals from other IRCF360 modules or remote control devices to control your robot or PC remotely. 

The IRCF360 will listen for Sony (SIRC 12-bit) IR messages. The returned data from the IRCF360 consists of two bytes, the 'Device' byte containing the type of remote used. i.e. TV, Video etc, and the 'Command byte' containing the actual button value pressed. The 
order of the bytes is Command (low byte) then System (high byte).  

030

BYTE2 = Sensitivity Zone (default 10us  )

BYTE3: 01 = Decimal
BYTE3: 02 = Ascii
BYTE3: 03 = Ascii Delimited

BYTE4: 255 =Continuous

 
360 Degree Infrared Proximity sensingProximity sensing in 360 degrees. All 8 IR transmitters are interpreted for proximity information.  

Byte 2 determines the sensitivity of the readings. This is useful when filtering of objects at certain distances need to be made or when other robots need to be followed.

The value indicates the pulse width frequency of the infrared signal and influences the sensitivity of the IR receiver. The peak sensitivity frequency of the infrared receiver is 38KHz (see notes). The default value is 10 which gives best readings for small robots where proximity sensing is within 100mm. This value also reduces and ground interference. 

The values between  9-12 should be entered-. If 0 is entered then the default value of 10us us used. Experimentation with different values should take place to see what works best with your own robot.

Byte 3 determines the output format, either decimal, ASCII or ASCII delimited.

Byte 4 determines whether the scanning should stop (0) after one loop or continue (255). 

8 raw bytes of serial data (proximity information) are transmitted to the serial port.  


Values from 0 to 100 are returned for each direction starting with the N (north) direction and then NE, E, SE, S, SW, W, NW.  In total 8 bytes of data are returned. each byte depicting the reading in each direction.

The command can be used for: 
  • proximity sensing when travelling in a direction and at the same time monitoring objects that may be moving towards. 
  • executed when in a stationary position to make assessment of the stationary objects or object that are moving.  
  • Determine and avoid possible attacks when in robot gaming mode
032

BYTE2 = INDEX 0-7  (determines which IR LED to fire. 0= North IR LED, 1=NE, etc)

BYTE3: 01 = Decimal Output
BYTE3: 02 = Ascii
BYTE3: 03 = Ascii Delimited

BYTE4: 0  = One Shot, 255 = Continuos 
Infrared Proximity sensing  in a specified directionSame as command 030, but proximity sensing  takes place in one specified direction as defined by Byte 2. 

1 byte of serial data (proximity information) is transmitted to the serial port. 

This command is used for detecting obstacle in the direction the robot is travelling. For example when travelling forward only the N, NE, NW directions need to be probed for objects. This reduces the volume of data that need to be processed. 


040

BYTE1 = 40 (the command)
BYTE 2 = INDEX 0-7 e.g 0=North, 2=East, 4=South, etc
BYTE3 = Duration in MS (default 200ms)

BYTE4: 0  = One Shot, 255 = Continuous 
 
Illuminate an LED on the circular display for a specified period Will illuminate one LED on the circular display for a specified time or continuously. 
The command is used to enable the robot controller to give visual feedback:
  • Debugging
  • Indication of state
  • Visual Effect
   
050

BYTE1: 50 = (the command) 
BYTE2 = LED Display Trigger

BYTE3: 01 = Decimal Output  BYTE3: 02 = Ascii Output  BYTE3: 03 = Ascii Delimited  

BYTE4: 0= One Shot, 255 = Continuous 
Light Sensing Measures the left and right ambient light levels and outputs the results as two words of data. The circular display illuminates on depending whether left or right side is brighter.
   
070

BYTE1: 70 = (the command) 
BYTE2: 0 = Fade Speed= default of 100 ms
BYTE3: 0= No Function
BYTE4: 0= One Shot, 255 = Continuous 

Circular LED display routine- fade-up and fade-downWill trigger the Circular LED to fade up and down. It is used as a visual indicator and to give an indication of a specific state or mood. A heart beat pattern would be Byte 2= 300, 300, 100

 
072

BYTE1: 72 = (the command) 
BYTE2: 0 = Fade Speed= default of 100 ms
BYTE3: INDEX
BYTE4: 0= One Shot, 255 = Continuous 
  
Illuminates ONE LED on the circular LED display to fade-up and fade-down. Speed = (BYTE2)
Will trigger one designate LED on the Circular LED display to fade up and down. 

The variable FADE_SPEED needs to be set. Enter 0 for default speed of 100. This effects total time of the fade period. For example, if a value of 1 is entered,  then there will be  2500us/BYTE2 per total fade period 


076

BYTE1: 76 = (the command) 
BYTE2: 0 = Fade Speed= default of 100 ms
BYTE3: 0= no function
BYTE4: 0= One Shot, 255 = Continuous  
Circular LED display routine - pingpongWill trigger a pattern on the circular display and turn on one LED at a time in a clockwise and then in an anticlockwise direction in a 'ping-pong' fashion.

It is used as a visual indicator and to give an indication of a specific state or mood.The speed is determined by BYTE2 which as a default value of 100ms     
077

BYTE1: 77 = (the command) 
BYTE2: 0 = Fade Speed= default of 100 ms
BYTE3: 0= no function
BYTE4: 0= One Shot, 255 = Continuous  
  


Circular LED display routine -rotate clockwiseWill illuminate one LED in turn in a clockwise direction. The command will stop after one cycle unless Byte 4 is set to 255.

It is used as a visual indicator and to give an indication of a specific state or mood. Could be used with other LED display routines to give special meanings.  The speed is determined by Byte2  where default is 100ms  
078

BYTE1: 78 = (the command) 
BYTE2: 0 = Fade Speed= default of 100 ms
BYTE3: 0= no function
BYTE4: 0= One Shot, 255 = Continuous  
  
  
Circular LED display routine -rotate anti-clockwise  Will illuminate one LED in turn in an anti-clockwise direction. It starts with the North LED. The command will stop after one cycle unless Byte 4 is set to 255.
 
It is used as a visual indicator and to give an indication of a specific state or mood. Could be used with other LED display routines to give special meanings. The speed is determined by Byte2  where default is 100ms    
079

BYTE1: 78 = (the command) 
BYTE2: 0 = Fade Speed= default of 100 ms
BYTE3: 0= no function
BYTE4: 0= One Shot, 255 = Continuous       
Circular LED display routine -SwipeStarting from north LED LED's will illuminate in a clockwise and n anti-clockwise direction until the South LED illuminates then reverse in a swiping action.  The command will stop after one cycle unless Byte 4 is set to 255.
 
It is used as a visual indicator and to give an indication of a specific state or mood. Could be used with other LED display routines to give special meanings. The speed is determined by Byte2  where default is 100ms