ข้อมูล
น้ำหนัก
บาร์โค้ด
ลงสินค้า
อัพเดทล่าสุด
รายละเอียดสินค้า

XD-78 Reed Switch Sensor Module Magnetron Module Reed Switch Magnetic Control Switch

  • Imported normally-open reed
  • Comparator output, clear signal, nice waveform and driving ability, more than 15mA.
  • Working voltage: 3.3V-5V
  • Output format: Digital switching output ( 0 and 1 )
  • With fix bolt holes for easy installation
  • Small PCB size: 32mm x 14mm
  • Adopting LM393 comparator with wide voltage



Code:

/* 
 
    Arduino with Test XD-78 Reed Switch Sensor Module Magnetron
 
    For complete project details, visit:Arduinoshop99
 
*/
 
 
int led = 12;                // the pin that the LED is atteched to
int sensor = 2;              // the pin that the sensor is atteched to
int state = LOW;             // by default, no motion detected
int val = 0;                 // variable to store the sensor status (value)
 
void setup() {
  pinMode(led, OUTPUT);      // initalize LED as an output
  pinMode(sensor, INPUT);    // initialize sensor as an input
  Serial.begin(115200);        // initialize serial
}
 
void loop(){
  val = digitalRead(sensor);   // read sensor value
  if (val == HIGH) {           // check if the sensor is LOW 
    digitalWrite(led, LOW);   // turn LED OFF
    delay(100);                // delay 100 milliseconds 
    
    if (state == HIGH) {
      Serial.println(" CLEAR OK "); 
       Serial.println(""); 
      
      state = LOW;       // update variable state to C
    }
  } 
  else {
      digitalWrite(led, HIGH); // turn LED ON
      delay(200);             // delay 200 milliseconds 
      
      if (state == LOW){
        Serial.println("Warning Detect Magnetic");
        Serial.println("");
        
        state = HIGH;       // update variable state to HIGH
    }
  }
 
}
 

 

เงื่อนไขอื่นๆ
Tags

วิธีการชำระเงิน

บมจ. ธนาคารกรุงไทย สาขาโรงไฟฟ้าบางปะกง ออมทรัพย์
ธนาคารกรุงเทพ จำกัด (มหาชน) สาขาบิ๊กซี ฉะเชิงเทรา 2 ออมทรัพย์
บมจ. ธนาคารกรุงไทย สาขาบิ๊กซี ฉะเชิงเทรา 2 ออมทรัพย์
พร้อมเพย์ สาขา- -
Scan this!
สนธยา ใจผ่อง
063-xxxxxx-8
Accept All Banks | รับเงินได้จากทุกธนาคาร
พูดคุย-สอบถาม