, , ,

Módulo sensor de obstáculos infravermelho para Arduino

REF: KS0051


Este sensor de obstáculos infravermelho foi desenhado a pensar nos robôs com rodas. Equipado com função de ajuste de distância, este sensor tem uma alta capacidade de se adaptar à luz ambiente e tem alta precisão. Contém um par de tubos de transmissão e receção infravermelho. Trabalha de forma constante, mesmo sob tensões de alimentação diferentes.

2,33 IVA INCL.

Módulo sensor de obstáculos infravermelho para Arduino

Working voltage: DC 3.3V-5V
Working current: ≥20mA
Working temperature: -10℃to+50℃
Detection distance: 2-40cm
IO Interface: 4 wire interface (-/+/S/EN)
Output signal: TTL voltage
Accommodation mode: Multi-circle resistance regulation
Effective Angle: 35°
Size: 41.7*16.7mm
Weight: 5g

REF: KS0051 Categorias: , , , Etiquetas: , , ,
Marca

const int sensorPin = 2;     // the number of the sensor pin
const int ledPin =  13;      // the number of the LED pin
int sensorState = 0;         // variable for reading the sensor status
void setup() {
  pinMode(ledPin, OUTPUT);      
  pinMode(sensorPin, INPUT); }
void loop(){
  // read the state of the sensor value:
  sensorState = digitalRead(sensorPin);
  // if it is, the sensorState is HIGH:
  if (sensorState == HIGH) {     
     digitalWrite(ledPin, HIGH);  
  } 
  else {
       digitalWrite(ledPin, LOW); 
}

 

Vídeo

Também pode gostar…