Sensor Analog

Magic Light Cup Module

A KY-027 magic light cup module pair combines tilt sensing and light output to mimic pouring light between cups.

Part images

KY-027 Module Photo. Module Photo for the KY-027 Magic Light Cup Module. Image source: Joy-IT SensorKit KY-027 module documentation
KY-027 Pinout / Module Diagram. Pinout / Module Diagram for the KY-027 Magic Light Cup Module. Image source: Joy-IT SensorKit KY-027 module documentation
KY-027 Arduino Wiring Diagram. Arduino Wiring Diagram for the KY-027 Magic Light Cup Module. Image source: Joy-IT SensorKit KY-027 module documentation
KY-027 Raspberry Pi Wiring Diagram. Raspberry Pi Wiring Diagram for the KY-027 Magic Light Cup Module. Image source: Joy-IT SensorKit KY-027 module documentation

What it is

A KY-027 magic light cup module pair combines tilt sensing and light output to mimic pouring light between cups.

How students use it

Students use it for playful tilt-triggered LEDs, reaction props, and state-machine projects.

Pins and power

Signal/output pins vary by board pair; verify the printed KY-027 labels before wiring.

Use module wiring that keeps sensor outputs Pico-safe.

One side behaves like a tilt input and one side drives an LED-style output in many kit examples.

Voltage and safety

Keep all GPIO-connected lines Pico-safe.

Power off while rewiring the pair. Avoid shorting module pins together.

Module internals

Main component: Tilt switch and LED module pair.

Tilt switch, LED, resistors, PCB, and headers.

Datasheet notes

The module is more of an interactive effect part than a precision sensor.

Common libraries

Use machine.Pin for tilt input and LED output.

Common mistakes

Mixing up the paired boards, expecting smooth angle measurement, and skipping debounce for the tilt contact.