Ky 027 Magic Cup Titlt Switch Module
Rs. 36.00 Rs. 44.00
- Product Code: SEN-VIB
- SKU -
- Availability: In Stock
- For Bulk Order 9962060070
Quick support on WhatsApp (+919962060070) only between morning 11am-4pm, no call will be answered
SPECIFICATIONS: | |
Operating Voltage Range | 3.3V – 5V |
Shipment Weight | 0.105 kg |
Shipment Dimensions | 7 × 6 × 4 cm |
OVERVIEW:
-On tilting the module mercury inside small tube connect the switching point and make switch ON while tilting it to other side move the mercury and it disconnects the circuit and switches get OFF.
-The module operates on 5V DC supply.
-₹ 49.00 (inc GST)
-₹ 41.53 (+18% GST extra)
PACKAGE INCLUDES:
1 PCS x Ky 027 Magic Cup Sensor
//SOURCE CODE TAKEN FROM BELOW LINK
//https://arduinomodules.info/ky-027-magic-light-cup-module/
int ledPinA = 9;
int switchPinA = 8;
int switchStateA = 0;
int ledPinB = 6;
int switchPinB = 7;
int switchStateB = 0;
int brightness = 0;
void setup()
{
pinMode(ledPinA, OUTPUT);
pinMode(ledPinB, OUTPUT);
pinMode(switchPinA, INPUT);
pinMode(switchPinB, INPUT);
}
void loop()
{
switchStateA = digitalRead(switchPinA);
if (switchStateA == HIGH && brightness != 255)
{
brightness ++;
}
switchStateB = digitalRead(switchPinB);
if (switchStateB == HIGH && brightness != 0)
{
brightness --;
}
analogWrite(ledPinA, brightness); // A slow fade out
analogWrite(ledPinB, 255 - brightness); // B slow bright up
delay(20);
}
15 days