Winston-Lu / ESP8266-LED-Shelf

A ESP8266 rewrite from the ground up of a 3D printable shelving system with a hidden giant clock in its shelves edges based off of the original project: https://github.com/DIY-Machines/DigitalClockSmartShelving
MIT License
12 stars 3 forks source link

Two Features Request: Alarm Clock + Countdown #16

Open nioubo opened 7 months ago

nioubo commented 7 months ago

Hello,

I am opening this issue, if someday, you could try to implement those two features, ?

Countdown : when it reaches the end, all segment displays [00 - 00] while blinking (and emitting a sound) Alarm Clock : when the alarm reaches the defined time, the clock is slowly dimming on and off (-> and a sound play)

For both idea I am looking to hookup a motherboard buzzer-speaker (still need to be purchased on AliExpress)

Thank you

Winston-Lu commented 7 months ago

One issue i might see is that the buzzer may not be very loud for an alarm, so you may want to look into some other audio device such as a speaker, but it'll be difficult to implement without the hardware and would need some sort of amplifier. I don't these features would be complicated to implement, however I do not have access to the hardware as I am currently abroad and wont be back until September. I could push some untested changes however it will be unstable and may not work correctly

nioubo commented 7 months ago

Yes, that was exactly my guess about the alarm volume...

I still have another option, but I need to dig for a way to activate a car stereo trough the arduino with some sort of hardware.

Winston-Lu commented 7 months ago

A piezo buzzer would be fine if you can power it with more than 5v. However you would need some amplifier for it such as a transistor amplifier so the esp8266 3.3v logic pins can drive the 9v signal for example https://electronics.stackexchange.com/questions/380206/how-to-make-active-buzzer-louder Note that you should not exceed the rated maximum voltage of the buzzer, and that the transistor should be close to saturating (turning on fully) at 3.3v otherwise we wont get the full volume. Otherwise we can add another stage at 5v to try to boost the current flow into the base of the transistor (or gate of a mosfet)

mercredo commented 4 months ago

Hi, I currently have some free time, had built the LED Clock with esp2866 in combination with the DIYMachines config in the last couple of months, and do implement the countdown right now. https://github.com/mercredo/ESP8266-LED-Shelf/tree/countdown

This is still work in progress, as I do not have much experience with c++. Atm I am testing it with a secondary board, but hopefully will do run some tests on my LED shelf in the next days or week.

Winston-Lu commented 2 months ago

@mercredo Finally got back and got to take a look at your code. If you can confirm that it does work, you could open up a PR and I could get it merged after a few changes. Some stuff like file removals are a bit questionable since those would be needed for a first time setup but not subsequent runs for example

mercredo commented 1 month ago

well, I did a few changes there, have to doublecheck those. Hope, Ill have some time the next days.