Programming, debugging and testing the microcontroller
The tiny microcontroller chip will be the brain of the model and will control all the animation and sound effects. I developed the code in C language on the computer and programmed the microcontroller through a small programmer box linked to the computer with a USB cable. After some debugging (things rarely work right the first time, which is an opportunity to further develop analytic skills...) the "brain" worked to my liking. Before assembling the electronics and doing all the soldering, I tested the brain on the small programming/testing board using the built-in LEDs to verify and fine tune the brain function, i.e. the random animation of the motor, magnet and flashing of the various lights (see the attached video).