1. Tracing sensors, Sensor: distance 1 Channel. 2. Sensor Size : 40x10 mm. 3. Use infrared light to detect anti-interference ability. 4. TCRT5000 high sensitivity, stable performance. 5. Working voltage of 5V.
Share
1 Channel Tracing Sensor Module (SM0010)
 


รายละเอียดสินค้า
1. Tracing sensors, Sensor: distance 1 Channel.
2. Sensor Size : 40x10 mm.
3. Use infrared light to detect anti-interference ability.
4. TCRT5000 high sensitivity, stable performance.
5. Working voltage of 5V.
const int LightSensorPin = A2; //กำหนดขาเซ็นเซอร์
int LightSensorValue = 0; //กำหนดค่าตัวแปรสำหรับเก็บค่าเซ็นเซอร์
void setup() {
 Serial.begin(115200); 
}
void loop() {
 LightSensorValue = analogRead(LightSensorPin); //อ่าน analog เซ็นเซอร์
 Serial.println(LightSensorValue);
 delay(100); 
}