Description
TCRT5000 Optical sensor for detecting reflective materials. e.g. picking up current meter pulses or letting a robot follow a line.
TCRT5000 specifications:
– Works on: 5v.
– detection distance: 12mm
€1,25
Optical sensor for detecting reflective materials.
111 in stock
TCRT5000 Optical sensor for detecting reflective materials. e.g. picking up current meter pulses or letting a robot follow a line.
TCRT5000 specifications:
– Works on: 5v.
– detection distance: 12mm
The value can be read without a library on the analog port where it is connected using the command: analogRead(A0);
/* Leest de TCRT5000 sensor op de analoge pin A0 en dimt de LED op pin 11
als er een object dicht bij de sensor komt.
*/
const int led = 11;
int tcrt;
void setup() {
Serial.begin(9600);
pinMode(led, OUTPUT);
}
void loop(){
tcrt = analogRead(A0);
Serial.println(tcrt);
analogWrite(led, tcrt/4);
} Only logged in customers who have purchased this product may leave a review.
Reviews
There are no reviews yet.