ATtiny85 Tone Bell for clock
Add a bell sound to your microcontroller clock.
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 and MegaClock RGB clock.
The principle is similar to the "muh box" concept, where the microcontroller executes sound commands in a non-blocking manner. This ensures that your clock continues to function without delays while the bell sounds are played.
How it Works :
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 the .zip attached 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
Want to build a project?
Bring your design to life with the Elektor PCB Service, powered by Eurocircuits. Upload the project files and order professionally manufactured PCBs or assembled boards through a proven European production platform.
Supporting KiCad, Eagle, Gerber, and ODB++ formats, the service is suitable for everything from prototypes and validation builds to series production and volume manufacturing.
Made in Europe. Fast. Reliable. Professional.

Updates des Autors