Model : Raykha S8IR sensor : TCRT5000Indication : Red SMD LEDs x 8Channels : 8Pitch : 10mmSupply voltage : 5V DCSupply current : 200mA maxDigital Outputs : 8Analog Outputs : 8PCB Size : 78.00mm x 25.00mm
Raykha Reflective sensor array is intended as a line sensor, but it can also be used as a general-purpose proximity or reflective sensor. To work with the Module following procedure to be followed.
Use 5V to power the module and the outputs can be uses with any digital input. Use the preset to adjust the activation threshold.
With a simple code you can can see reykha in action.
Use this code to test your sensor.
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
pinMode(10, INPUT);
pinMode(11, INPUT);
}
// the loop function runs over and over again forever
void loop() {
if(digitalRead(10) && digitalRead(11) == true)
{
digitalWrite(LED_BUILTIN, LOW); // wait for a second
}
else
{
digitalWrite(LED_BUILTIN, HIGH);
}
// turn the LED off by making the voltage LOW
}
Comments
Please log in or sign up to comment.