Skip to main content

Menu

Light Cup Module Arduino Compatible

ARD2-2227
Arduino Compatible ARD2 Light Cup Module

$2.95

QTYPrice
1 $2.95

Description

The Arduino compatible Light Cup Module is a set of two boards which has LED and a mercury tilt switch. This module is based on the principle of PWM dimming; you can achieve the brightness of two LEDs changes as they are tilted, as the light is magically moved from one module to the other. Two components combined, a mercury tilt switch and a LED. When you tilt the mercury switch, the led will turn on and off.

This Light Cup Module operates on a 5V DC supply. Compatible with Arduino-compatible boards.

Test Code

int LedPinA = 5;
int LedPinB = 6;
int ButtonPinA = 7;
int ButtonPinB = 4;
int buttonStateA = 0;
int buttonStateB = 0;
int brightness = 0;

void setup() {
pinMode(LedPinA, OUTPUT);
pinMode(LedPinB, OUTPUT);
pinMode(ButtonPinA, INPUT);
pinMode(ButtonPinB, INPUT);
}

void loop() {
buttonStateA = digitalRead (ButtonPinA);
if (buttonStateA == HIGH && brightness! = 255) {
brightness ++;
}

buttonStateB = digitalRead(ButtonPinB);
if (buttonStateB == HIGH && brightness != 0) {
brightness -;
}

analogWrite(LedPinA, brightness);
analogWrite(LedPinB, 255 - brightness);
delay(25);
}

Features

  • Create the illusion that two LEDs are 'pouring' light into each other when they are tilted together

Specifications

Supply Voltage

5.0V

Colour

Black

Material

PCB

Weight

5g

Resources

All prices are in Australian Dollars and include GST. GST will be removed from your order if you are ordering from outside Australia.
Products may differ from pictured.
All trademarks and trade names are the properties of their respective owners. Wiltronics disclaims any proprietary interest in trademarks and trade names other than its own.

Light Cup Module Arduino Compatible

ARD2-2227

$2.95

We use cookies to ensure you have the best experience on our site. If you continue to use this site you consent to the use of these cookies. OK

Find out more in our Privacy Policy