Warf Corporation Co.,Ltd.
บริษัท วาร์ฟ คอร์ปอเรชั่น จำกัด
084-0880243 , 02-0466011
โพสเมื่อ
Arduino magnetic reed switch module for Sensor Shield ,Arduino magnetic reed switch module,,Automation and Electronics/Electronic Equipment/Modules
รหัสสินค้า
NANA-145133
ชื่อสินค้า
Arduino magnetic reed switch module for Sensor Shield
รายละเอียด:

Arduino magnetic reed switch module for Sensor Shield

The magnetic reed switch module is a wonderful tool for designers who would like to turn a circuit on and off based on proximity. A digital “high” value is given when approached by magnet in around 1 inch (depends on strength of the magnet)

 

Building interactive work is as easy as piling bricks, just plug it to our Sensor Shield with a buckled cable, and make it looks professional and neat.

Free buckled cable is included.


Example code to turn off LED when approached by a magnet:

int ledPin = 13;               // choose pin for the LED 
int inputPin = 2;              // choose input pin (for magnetic switch) 
int val = 0;                     // variable for reading the pin status  

 void setup()

 { 
   pinMode(ledPin, OUTPUT);      // declare LED as output   
   pinMode(inputPin, INPUT);      // declare magnetic switch as input
   } 

  void loop()

 { 
    val = digitalRead(inputPin);       // read input value 
    if (val == HIGH)

 {                                                // check if the input is HIGH     
      digitalWrite(ledPin, LOW);      // turn LED OFF 
    } else

 {    
      digitalWrite(ledPin, HIGH);     // turn LED ON
    }
 }








ข้อมูลเพิ่มเติม www.warf.com


คำค้นหา:
switch module reed arduino magnetic

บริษัท วาร์ฟ คอร์ปอเรชั่น จำกัด

Warf Corporation Co.,Ltd.

150/24 หมู่ที่ 3 ถนนเทพารักษ์ ต.บางพลีใหญ่ อ.บางพลี จ.สมุทรปราการ 10540

084-0880243 , 02-0466011
02-3855775

Contact: ภากร หุตะสังกาศ