|
Usage
Compound eye is mainly used to detect the surrounding infrared rays, whose strongness is called ray value. Compound eye is used widely, for example, to detect lighted candle in the firefighting competition, or to tell the ball direction in the soccer match.
1. working theory
Compound eye is made up of one CPU and seven IR photodiodes. CPU keeps detecting the strongness of infrared rays of IR photodiode in different places and find out the strongest one. When CPU receives command from the robot controlling kit, it will return the figure.
2. module installation
Connect compound eye to one of RCU's free ports. Pay attention that the black wire should be put on the margin.
3. Software controlling In RoboExp, compound eye gets a module icon for controlling.Open its property window, input commands in the "command" block, and the compound eye is under controlled now. The following is the meaning of different commands:
| command |
meaning of return value |
description |
|
1 |
ray value of 1st channel |
Read ray values of the 7 directions in an 180 degrees range. |
|
2 |
ray value of 2nd channel |
|
3 |
ray value of 3rd channel |
|
4 |
ray value of 4th channel |
|
5 |
ray value of 5th channel |
|
6 |
ray value of 6th channel |
|
7 |
ray value of 7th channel |
|
8 |
channel of maximum ray value |
Instant reading of the maximum ray value and telling its direction. |
|
9 |
maximum ray value |
|
10 |
channel of minimum ray value |
Instant reading of the minimum ray value and telling its direction. |
|
11 |
minimum ray value |
|
12 |
average of the 7 detected ray values |
Instant reading of average ray vaule. |
4. notice
Beware that the 7 detect tubs should be installed downwards (under bottom of the PCB).
appendix: interface description
| No. |
color |
name/function |
|
1 |
black |
GND |
|
2 |
red |
+5V~+8.2V power supply |
|
3 |
yellow |
SDA information signal wire |
|
4 |
brown |
SCL clock signal wire |
JMP-BE-1722 compound eye's I2C hardware address is 0x08. Follow the standard I2C protocol and the information can be read in way of MASTER READ.
|