5288

Add a bell sound to your microcontroller clock. This assembly is intended to be controlled, also, it is reserved for the reader who can modify their original code. An example code of which portions must be inserted (adapted) is provided to you. see code : COMMANDE_TONE_BELL_NON_BLOQUANTE.ino All you have to do is find a free pin on your clock and control it to control the bell sounds. For my part, I integrated it into my MegaClock rgb clock. (update to come...)


All you have to do is find a free pin on your clock and control it to control the bell sounds.
For my part, I integrated it into my clock HP display see  https://youtu.be/jCmF5OtTugU 
https://www.elektormagazine.fr/labs/clock-hp-5082-7340-hexadecimal-display-and-atmega-328
and MegaClock rgb clock. 
https://www.elektormagazine.fr/labs/mega-clock.
The principle is identical to the muh box.
3v3 to 5v power supply
A reset of the Attiny takes it out of sleep mode, the ATtiny emits a bell then returns to sleep mode.
The equipped clock controls the ATtiny reset pin according to the number of moves to be played.
Code bell : ATtiny_TONE_BELL.ino
Mount two resistors as shown in the attached diagram: ATtiny_Tone_Bell_Schema (color or nb)
An example of non-blocking code using millis and not a for i loop, 
which would block the "clock" code during the bells is provided for quick testing with an Uno, Nano, Mega type card.
It's up to you to adapt it to your project.
SEE ZIP and  video https://youtu.be/YMD9Nm6zE1o  
//FR
Le principe est identique à la boite à mheu.
Alimentation de 3v3 à 5v.
Un reset de l'Attiny le sort du mode sommeil, l'ATtiny émet un coup de cloche puis repart en mode sommeil.
L'horloge équipée pilote la pin reset de l'ATtiny suivant le nombre de coup à jouer.
Monter deux résistances comme indiqué sur le schéma joint : ATtiny_Tone_Bell_Schema (color or nb)
Un exemple de code non bloquant, utilisant millis et non une boucle for i, qui bloquerait votre code "horloge" durant les coups de cloches, est fournie, pour test rapide avec une carte type Uno, Nano, Mega.
C'est à vous de l'adapter à votre projet.
Voir ZIP et video ici :: https://youtu.be/YMD9Nm6zE1o