Happy Holidays from LeafLabs!

 
 

LeafLabs Holiday Widget 2024

This project was undertaken primarily as a learning and training experience for our two summer interns, giving them hands-on exposure to the design and development of an embedded system. They were tasked with designing a custom printed circuit board and writing the associated firmware for the ornament.

The ornament is both decorative and interactive, featuring vibrant lights, festive music, and simple games. It can be hung up as a charming decorative piece while also offering playful functionality.

Key learnings of the project included:

  • PCB Design: Fundamentals of circuit design, component selection, and layout.

  • Firmware Development: Programming the device to control LEDs, synchronize music playback, and basic gaming functionality. Deep dives into the STM32L0 architecture, including how to use DMA to drive speakers and capture microphone data.

  • Systems Integration: Experience integrating hardware and software components into a cohesive product. They had real-world experience triaging and debugging issues that arise when trying to produce a PCB in volume.

This project served as an excellent introduction to practical engineering, promoted creativity, collaboration, and technical skill development in a real-world context.

We hope you enjoy this ornament- we had fun making it, and a lot was learned. If you would like to customize yours, please check out the firmware on GitHub.

https://github.com/leaflabs/holiday-widget-2024

 
 

What does it do?

The Holiday Widget possesses several game modes for your enjoyment. This includes classics like “Brick Breaker”, “Pong”, and “Space Invaders”, as well as a simulated snowfall backdrop accompanied by holiday music, and an auditory overtone visualizer.

How do I use it?

Game modes can be rotated through in a round-robin fashion by double-tapping the board.

Games can be intuitively interacted with by tilting the board in the desired direction of movement.

How to play Brick Breaker

Objective: use your paddle to hit the ball into the stationary bricks, destroy all of the bricks before running out of lives to win. You begin each game with 3 lives. Lives are lost when your paddle misses the ball and it exits the bottom of the display - at which point the remaining number of lives will scroll across the display. To move your paddle, tilt the board left and right.

How to play Pong

Objective: score 3 goals before your opponent does. Goals are scored when an opponent misses the ball and it exits their side of the display. Use your paddle to hit the ball towards your opponent's paddle, and avoid missing the ball yourself. Upon each goal, the current score will scroll across the display. To move your paddle, tilt the board up and down.

How to play Space Invaders

Objective: destroy all enemy ships before running out of lives. You begin each game with 3 lives. Lives are lost when your ship is hit by an enemy bullet, at which point the remaining number of lives will scroll across the display. Enemy ships are destroyed when hit by one of your bullets. If your bullet collides with an enemy bullet, both bullets will be destroyed without consequence. User bullets are fired periodically by your ship, while enemy bullets are fired periodically by a random enemy ship. To move your ship, tilt the board left and right.

How to “play” Snowfall w/ Holiday Music

Sit back, relax, and soak in the holiday spirit!

How to “play” Overtone Visualizer

Expose the board to a variety of sounds and observe the amplitudes of the first six overtones. Observe the variation in formant-composition between different vowels and auditory sources.