Posts

Showing posts from December, 2023

Christmas Toy

Image
Over the Christmas holidays, I decided to use my nascent electronics skills to rustle up a little toy for the Christmas tree. I took inspiration from the little Asian waving cat, Maneki-neko , that's often seen at Asian stores and restaurants. I wanted to make a little Santa figurine that would light-up, wave and say "Merry Christmas" when someone came close to it. I decided to use the Arduino Uno (because I already had one) for the microcontroller (uC), an  addressable light strip for the lights, an HC-SRO4 ultrasonic sensor for proximity-based triggering and a tiny 4-ohm 3-watt speaker  for the sound to come out of.  The first thing was to make the setup say something. I found out, initially from this youtube channel , that there is an Arduino PCM library that can play short audio samples. These samples are encoded in the Arduino sketch as an array of numbers. HiLowTech describes the process of converting an audio sample into this series of numbers. Downsampling the...