ATtiny85 Tone Bell for clock
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 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.
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 :
3v3 to 5v power supply powers the ATtiny85, 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 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
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
Discussion (3 commentaire(s))