|
Feature:
- Infrared directional sensor can be used on robot navigation.
- It can be used to sense the infrared light intensity in 180 degree.
- 8 commands can be used to detect the intensity in 8 different directions, and the direction with maxim intensity.
- It can be connected to host MCU through UART.
Specification:
- Chipset: ATmega8
- Voltage: 5V
- Current: 20mA
- Diameter: 5cm.
Interface Pins:
- RX: UART in (TTL)
- TX: UART out (TTL)
- +: VCC DC 4V to 6V
- -: GND
The LEDs can be used to show which way the infrared has maxim intensity.
Arduino function description:
fireway(char rx,char tx,char temp)
This sample function uses the software serial port. rx and tx are the digital pins of arduino that are connected to this breakout board. temp is from 0 to 7.
After reset the module, temp means:
0: It will measure the intensity of sensor 0. The output value is from 0 to 1024.
1: It will measure the intensity of sensor 1. The output value is from 0 to 1024.
2: It will measure the intensity of sensor 2. The output value is from 0 to 1024.
3: It will measure the intensity of sensor 3. The output value is from 0 to 1024.
4: It will measure the intensity of sensor 4. The output value is from 0 to 1024.
5: It will measure the intensity of sensor 5. The output value is from 0 to 1024.
6: It will measure the intensity of sensor 6. The output value is from 0 to 1024.
7: It will measure the intensity of sensors 0 to 6 , and output the maxiim value . The output value is from 0 to 1024. At the same time, it will turn on the corresponding LED.
Sample Code:
- #include "SoftwareSerial.h"
- #include "Irdirection.h"
- void setup()
- {
- Serial.begin(9600);
- }
- void loop()
- {
- int i=0;
- irdirection c;
- i=c.fireway(2,3,7);
- Serial.println(i);
- delay(100);
- }

|