Freeship đơn từ 45k, giảm nhiều hơn cùng
icon
Standard Tilt Switch Module For  AVR PIC
product-img-0product-img-1product-img-2product-img-3product-img-4product-img-5product-img-6product-img-7
Thương hiệu: OEM

Standard Tilt Switch Module For AVR PIC

88.000
Sản phẩm đã hết hàng
Bạn có thể xem các sản phẩm tương tự.
Mô tả sản phẩm

Specification:

Routines source code:
int Led = 13 ;// define LED Interface
int buttonpin = 3; // define the tilt switch sensor interfaces
int val ;// define numeric variables val
void setup()
{
pinMode(Led, OUTPUT) ;// define LED as output interface
pinMode(buttonpin, INPUT) ;// define the output interface tilt switch sensor
}
void loop ()
{
val = digitalRead(buttonpin) ;// digital interface will be assigned a value of 3 to read val
if(val == HIGH) // When the tilt sensor detects a signal when the switch, LED flashes
{
digitalWrite(Led, HIGH);
}
else
{
digitalWrite(Led, LOW);
}
}

Package Includes:

1 Piece KY-020 Tilt Switch Module

Note:

Color maybe slightly different due to different monitor.
The above size is measured by hand, please allow slightly difference. Thanks !

Giá sản phẩm trên Tiki đã bao gồm thuế theo luật hiện hành. Bên cạnh đó, tuỳ vào loại sản phẩm, hình thức và địa chỉ giao hàng mà có thể phát sinh thêm chi phí khác như phí vận chuyển, phụ phí hàng cồng kềnh, thuế nhập khẩu (đối với đơn hàng giao từ nước ngoài có giá trị trên 1 triệu đồng).....