5.0 Testing
Testing the IRCF360 serial communications on the PC
It is recommended to first test the communications of the IRCF360 usinga PC and a terminal program. This give you an easy way to familiarise yourself with the commands and to check that everything is functioning as expected.
There are many freeware, shareware and commercial software programs to test the serial connection with the Infrared Control Freak Light and with the robot controller.
Docklight
One program that can be recommended is the software from Docklight. See (http://www.docklight.de/). Evaluation copies of the software (with limited functionality) can be downloaded from their website for free. The demo version works fine for limited testing of the Infrared Control Freak, but you won't be able to save the commands that you create.
To save time entering all commands manually here is a doclight project file that you can download to the docklight folder:
Then change the communication speed and comm port as follows:
Go to the Tools/Project setting option:
Then set the communication speed as follows:
On the flow control tab, set flow control to OFF. Press OK and close the pop-up window.
Creating a Send Sequence
If you would like to create a new send sequence from scratch then first create a new project in File/New Project
To create a ‘Send Sequence’ button then double-click on the name row.
A pop-up window will appear to enable a name and a send sequence to be entered.Ensure that Decimal is select as data type.
The 1st byte is the command in this case the 360 Infrared Proximity Scanning (030)
The 2nd Byte is a configuration and can be 0 or 10.
The 3rd byte is the output format. In this case we select ASCII
The 4th byte is an instruction to the IRCF360 to keep repeating this command until another command is sent.
Press OK. And a button is created with the name Command 30. In the Sequence column there are the 4 Byte we entered.
Connect the IRCF360 to the serial port as deccribed in section 3.0 and ensure that the IRCF360 is powered up with 5v correctly.
Press the ASCII table as the results are easier to read in ASCII format rather than decimal format
Press the Send Button -->
If all worked OK, then the data sent will be echoed in the Communication area and a continuous stream of proximity data will be transmitted to the PC screen as follows:
On the IRCF360 the brightness of the LED's will also light up according to the value of the proximity sensing (0-50)
HyperTerminal
HyperTerminal is another software application that can be used. It is most probably already installed on your PC (see under Programmes/Accessories/Communications). The HyperTerminal also works very well when sending command code to the Infrared Control Freak. To learn more about ASCII format see appendix E- ASCII TABLES or htpp://www.asciitables.com. The main reason some commands have an ASCII output option is that it is a lot easier to interface to an ASCII terminal emulator and debug the results. These commands are also more likely to be used in standalone non-robot applications.
Press ‘Connect to’ and select COM1 (or what ever COM port you are connected to). Press OK.
In the COM1 property window, select 9600 baud, 8 data bits, no parity, one stop bit, and flow control as ‘None'.
The command that is ‘sent’ to the IRCF360 needs to be in DECIMAL format. There are no normal character keys that can be pressed on the keyboard that represent 031, so this must be sent by holding down the ALT key and typing 031 on the keypad (this must be done on the keypad, with the num-lock on). Then release the ALT key.
If nothing happens, you can set the ‘ASCII Sending’ property as defined above and see what is being sent. A graphic symbol should be displayed something like this ▲.
Press a button on the remote control and the device code and button code will be displayed on the main HyperTerminal window.
Power-Up Tests
The sensor module is programmed with a power-up routine. Connect the module to 5v DC as described in section 3.0.
Within a 5 seconds of connecting the power supply, the red LEDs should light up; one after the other, in a clockwise direction and then in an anticlockwise direction. The module will then search for a command on the serial port. If no command is being transmitted, the module will continue this routine until a command signal is detected.