- Send to a friend
-
- Remove this product from my favorite's list.
- Add this product to my list of favorites.
No specials at this time
No products added yet
Detailed Description:
Electrical Characteristics:
Indicator Lights:
Red: power supply positive 4.5-5V
Yellow: TTL output for connection to microcontroller
Green: GND
Output current: DC / SCR / Relay Control 100mA/5V supply
Current consumption: DC <25mA
Response time: <2ms
Angle: more than 15°
Effective distance: Adjustable from 3-80CM
Working environment temperature: -25 °C ~ 55 °C
Arduino code example:
/*
photoelectric arduino
red----------------5V
black--------------GND
yellow-------------9
*/
typedef unsigned char uchar;
uchar signal=9;
void setup()
{
pinMode(signal,INPUT);
Serial.begin(9600);
// put your setup code here, to run once:
}
void loop()
{
if(!digitalRead(signal))
{
Serial.println("The chip receives the sensor signal");
}
while(!digitalRead(signal));
// put your main code here, to run repeatedly:
}