Switch magnético en módulo interruptor abierto Reed

$60.00

HW484

5 disponibles

SKU: REEDM Categoría: Etiqueta:
Comparte!

Descripción

Módulo reed switch

El Reed Switch es un interruptor que se activa en presencia de campos magnéticos, se encuentra en la mayoría de los sensores magnéticos, que son utilizados para activar alarmas de hogares o puertas automáticas, es muy recomendado gracias a que puede soportar ambientes hostiles y seguir operando de manera adecuada.

Trabaja con 5 V y es Normalmente abierto.

Diagrama Arduino

 

Código Arduino

Int Led = 13; / / define LED interface

Int buttonpin = 3; / / define the Reed sensor interface

Int val. / / define digital variable val

Void setup ()

{

PinMode (Led, the OUTPUT); / / define the LED for the output interface

PinMode (buttonpin, INPUT); / / define Reed sensor as the input interface

}

Void loop ()

{

Val = digitalRead (buttonpin); / / to assign the value of digital interface 3 read val

If (val = = LOW) / / when the Reed sensor have a signal, the LED light

{

DigitalWrite (Led, HIGH);

}

The else

{

DigitalWrite (Led, LOW);

}

}

}

If (RI)

{

The date = SBUF; / / microcontroller to accept

SBUF = date; / / microcontroller send

RI = 0;

}

}

}

Valoraciones

No hay valoraciones aún.

Sé el primero en valorar “Switch magnético en módulo interruptor abierto Reed”

También te recomendamos…