Valentineβs Day is often described through grand gestures β red roses, handwritten letters, long dinners. But love doesnβt only live in big moments. Sometimes, it exists in the quiet, almost invisible ways we reach for each other across distance.
This project was born from a feeling many of us know: Missing someone we love! We want to let them know, but not through a phone notification or another message on a screen. But through something warm, present, and alive in the physical world.
So we imagined two lamps, living in two different spaces, sharing one silent conversation.β€οΈπ‘
Today, we will build together our synchronized I Miss You light. When one person opens their lamp, the other one gently wakes up too β light unfolding from inside. The color of your choice, move through a heart-shaped shell -that you can 3D print- filling the room with a quiet reminder that someone you love is thinking about you right now.
To make the interaction feel more natural and alive, the lamp also uses an integrated radar sensor. Instead of pressing a button, simply placing your hand over the lamp becomes the gesture that triggers it.
LetΒ΄s get started then!
HardwareThe Hardware is quite simple. You will need to 3D print the lampΒ΄s parts and then slide a motor in place, add a 3D printed gear, and then stick some LEDs on the flat surface that you also need to print.
Afterwards, connect your motor to the motor control and then to the PSOCβ’ AI Kit, and you are ready to go!
Schematics
To make both lamps βsynchronizeβ, we use MQTT, which is a communication protocol designed for IoT devices. You can think of MQTT like a minimal chat system for hardware β devices donβt talk directly to each other, they send messages through a middle point called a broker.
The broker is basically the message post office. Each device can publish messages (send updates like βIβm onβ or βIβm offβ) and subscribe to messages (listen for updates from the partner lamp). This makes the system really scalable and clean, because devices donβt need to know each otherβs IP addresses or network details β they just agree on topics and exchange messages through the broker. The broker can be public (like in our case, test.mosquitto.org for testing) or private if you want more security and control.
Since everything happens over the internet, both lamps need Wi-Fi access. Once connected, each board runs a MicroPython script that does three main things: connects to Wi-Fi, connects to the MQTT broker, and then continuously listens and sends status messages.
For the hardware setup, both devices run almost the same code saved as main.py. The only difference is the topic direction:
β’ Device 1 publishes to me β partner
β’ Device 2 publishes to partner β me
What you also need is the library called simple.py that you have to download on your device under a file you name 'umqtt'.
print("Connecting to wifi...")
import network
sta = network.WLAN(network.STA_IF)
sta.connect('name of wifi', 'password')
print("Connected to wifi.")
import machine
def mqtt_callback(topic, msg):
print(f'Callback triggered on topic: {topic}, message: {msg}')
import umqtt.simple
import ubinascii
mqttc = umqtt.simple.MQTTClient(f'me-{sta.config('mac')}', 'test.mosquitto.org', keepalive=60)
mqttc.set_callback(mqtt_callback) # -> this function will be called when a MQTT message on a subscribed topic is received.
print("Connecting to mqtt broker...")
mqttc.connect()
print("Connected to mqtt broker.")
mqttc.subscribe('lovelight-1402/partner/status')
from time import sleep
while True:
sleep(5)
mqttc.publish('lovelight-1402/me/status/', '0')
mqttc.check_msg()β’ network.WLAN(network.STA_IF): Creates a Wi-Fi interface in station mode. This basically means the board connects to an existing Wi-Fi network (like your home router) instead of creating its own hotspot.
β’ sta.connect("wifi_name", "password"): Connects the board to your Wi-Fi network so it can reach the MQTT broker over the internet.
β’ mqtt_callback(topic, msg): This is the message receiver function.
Whenever a message arrives from the broker on a subscribed topic, this function runs automatically.
β’ umqtt.simple.MQTTClient(...) Creates the MQTT client object.
This is the βidentityβ of your device when talking to the broker.
β’ mqttc.set_callback(mqtt_callback): Tells the MQTT client which function to run when a message is received.
β’ mqttc.connect(): Opens the connection to the MQTT broker.
Once this runs successfully, the device is officially part of the MQTT network.
β’ mqttc.subscribe("topic_name"): Tells the broker:
βSend me messages whenever something is published on this topic.β
In this project, each lamp subscribes to the partner lampβs status topic.
β’ mqttc.publish("topic", "message"): Sends a message to the broker.
For example:
- "1" β Lamp ON
- "0" β Lamp OFF
The partner lamp receives this and mirrors the action.
β’ mqttc.check_msg(): Checks if new messages arrived from the broker.
If yes β triggers the callback function.
Once this communication layer is working, you can plug in whatever you want β LEDs, motor rotation, radar detection, light animations. In our case, one lamp controls the switch through a hand tap detection and lighting, while the partner lamp mirrors the action and adds rotation and the same LED effect.
The full code is quite simple; you can find it below! If you use it you will get an output like this :
Now enjoy your special gift and happy V-day! Hope you spend it with someone you love.
PS: The design was inspired by this cool project!


















_3u05Tpwasz.png?auto=compress%2Cformat&w=40&h=40&fit=fillmax&bg=fff&dpr=2)
Comments