Go Down

Topic: Need help to finish the code (Read 985 times) previous topic - next topic

wvmarle

That was the quick solution; the other option is to create yet another flag to indicate time has just been set, and check for that.

For the effects, you can add code tags to not mess up layout, as it uses a monospace font. Later tonight I'll have a look at it.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

arduinoware

#46
Jan 15, 2018, 01:47 pm Last Edit: Jan 15, 2018, 01:48 pm by arduinoware
That was the quick solution; the other option is to create yet another flag to indicate time has just been set, and check for that.

For the effects, you can add code tags to not mess up layout, as it uses a monospace font. Later tonight I'll have a look at it.
** Yes, please create that new flag if it is not too hard for you, please. to check if the time has just been set. That was my dream from day 1. :)

Also, please remember the other outstanding issues I mentioned previously. which are:

********************
1)     Please remember to debug that alarm issue.

6)     For the alarm sound, to implement: half-second beep, then half-second silence, then 1 second beep, then the main pause of only 1 sec. 1 sec is plenty. I would say, 5 sec is way too much.

7)    Another minor bug. In "time-setting", if you have the "hours" selected/flashing, and if you longPress the "minute" button, it advances the "hour" by one, but it doesn't happen the other way around. So, if "minutes" are flashing, and if you longpress hour button, it doesn't do anything wrong. Only when "hour" is selected. minute longpress somehow affects it.

8)     To remove the boring or repetitive effects and implement those 4 new effects shown in previous message.

So, that I still have a total of 10 effects.

********************


wvmarle

1) is in progress.
A "break" was missing so the alarm played only once, instead of repeating until user switches it off.
It does trigger when setting the alarm time directly in the code. I haven't tried doing it by setting it in the clock, as it should be done. At the moment in the 5-minute wait of the snooze, see if it goes again.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

arduinoware

#48
Jan 15, 2018, 05:17 pm Last Edit: Jan 15, 2018, 05:29 pm by arduinoware
1) is in progress.
A "break" was missing so the alarm played only once, instead of repeating until user switches it off.
It does trigger when setting the alarm time directly in the code. I haven't tried doing it by setting it in the clock, as it should be done. At the moment in the 5-minute wait of the snooze, see if it goes again.
Just a note:

Please disregard everything about hourly special effects. The ones that play every hour. I have decided to remove them all together. I just remembered that my son is epileptic. it may cause issues in complete darkness.

So, please remove all hourly special effects. all 10 of them. Also, please remember to remove all the logic that is related to hourly special effects.

But, please keep the alarm sound and lights. In a way that I suggested in my post above. half-second beep, half-second silence, 1 second beep, 1 second silence.

So, if we are removing the hourly specialEffects(), we still do need the additional one flag, don't we?

Otherwise, if I set the alarm time and clock time to same value, the alarm may start to play immediately when exitting to normal display, rather than next day. So, please implement the flag for the alarm not to play if time has just been set. but remove all hourly special effects. I hope it will be a little less work for you.

Thank you.

wvmarle

Quote
In "time-setting", if you have the "hours" selected/flashing, and if you longPress the "minute" button, it advances the "hour" by one, but it doesn't happen the other way around. So, if "minutes" are flashing, and if you longpress hour button, it doesn't do anything wrong. Only when "hour" is selected. minute longpress somehow affects it.
I can't reproduce this behaviour. I did find another issue with the alarm button while setting time/alarm: a long press would switch on/off the alarm which is not appropriate at that time. Long press and short press are same behaviour now while setting alarm/clock.

Snooze tested and works.

Alarm tested and works.

EEPROM tested and works; alarm is stored correctly.

Hourly effects disabled (didn't start removing flags; they're not in the way; first get it working all as it should).
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

arduinoware

I did find another issue with the alarm button while setting time/alarm: a long press would switch on/off the alarm which is not appropriate at that time. Long press and short press are same behaviour now while setting alarm/clock.
I'm not sure what you mean by this. Can you explain in more detail?

I will test the new sketch now to see if that "minute longPress thing" affects the "hour" value in time setting mode. I am certain that it was happening before. I tried several times.

Let me do a test and get back to you.

Cheers.

wvmarle

When you were in time setting mode, you could still enable/disable alarms with the long press (and see the nice animation). That just doesn't make sense.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

arduinoware

#52
Jan 15, 2018, 07:36 pm Last Edit: Jan 15, 2018, 08:08 pm by arduinoware
When you were in time setting mode, you could still enable/disable alarms with the long press (and see the nice animation). That just doesn't make sense.
I was able to do that before, but with the latest iteration of sketch, I can't do that. So, that is probably solved.

TEST RESULTS: (sorry, again I have numbered things, but we are almost there). Most of these are probably easy.

1)    Alarm lights are working. But there are no beeps coming out of the buzzer. Only very very quiet clicks that are barely noticeable.

2)    The issue with "minute long presses" affecting "hour" in time setting mode seems to be gone. SOLVED.

3)    The transition from "normal display" to "time setting mode" still doesn't feel right. After you introduced the 500ms delay to avoid accidental advance on buttons, I can hear some erratic or occasional clicks from the buzzer when moving to "time setting mode" by longPressing hour/minute. Especialy, if I release the hour/minute buttons a bit late. Not sure what can be done here.

I get that sort of erratic and random noises or clicks if I press hour or minute buttons in quick succession. But it is rare. I mean, not press and hold, but quick successions. What could be causing it?

4)    The alarm switch ON animation is still wrong. After the rows fill up and the flash is still short. I wanted the rows to fill up and then one long flash. Also, the alarm switch OFF animation, please make it just rows filling down. no flashes. This will feel better.

5)    Please, don't forget to implement a new flag for alarm not to play if the alarm condition is achieved but if the time has just been set manually.

6)    And if finalized, please remove all hourly specialEffects() and its logic to make the code cleaner.

7) ** This one is a question: When the alarm is playing,  if you short press buttonAlarm once it goes to snooze. and switches alarm animation off. but then, if you longPress buttonAlarm to switch alarm off, it turns on all 13 LEDs for a fraction of a second before going back to normal display. Is that the intended behaviour?

Thank you sir.

arduinoware

Hi my friend.

Please see these outstanding issues as soon as you can.  Please. I must get on the plane on the 20th. If it is not finished by then, it will all be for nothing. I am really counting on you.

I am hoping that you will receive all 3 items safely. The first package was not fragile. The items in the second one are a little fragile. So I spent half a day trying to pack it. Hopefully it will het there in 1 piece.

Please keep me posted.

Cheers.

arduinoware

Please see these outstanding issues as soon as you can. I must get on the plane on the 20th. If it is not finished by then, it will all be for nothing. I am really counting on you. Please.

I am hoping that you will receive all 3 items, that I sent you, safely. The first package was not fragile. The items in the second one are a little fragile. So I spent half a day trying to pack it. Hopefully it will get there in one piece.

*******************************************************************************
I have done a very thorough test. Most of the issues below are routine, but I've numbered them so we don't forget. Please pay special attention to note 4.
*******************************************************************************

1)    Alarm lights are working. But there are no beeps coming out of the buzzer. Only very very quiet clicks that are barely noticeable.



2)    The transition from "normal display" to "time setting mode" still doesn't feel right. After you introduced the 500ms delay to avoid accidental advance on buttons, I can hear some erratic or occasional clicks from the buzzer when moving to "time setting mode" by longPressing hour/minute. Especialy, if I release the hour/minute buttons a bit late. I get that sort of erratic and random noises or clicks if I press hour or minute buttons in quick succession. I mean, not press and hold, but quick successions. What could be causing it?



3)    The alarm switch ON animation is still wrong. After the rows fill up and the flash is still short. I wanted the rows to fill up and then one long flash. Also, the alarm switch OFF animation, please make it just rows filling down. no flashes. This will feel better.



4)   To enter TIME SETTING MODE, you longPress hour/minute. So, if you set alarm time and then move over to clock setting, and you longPress hour/minute again, it moves you back to the start of setting mode which is alarm setting mode. This doesn't make sense. So, instead can you change the behaviour to be like this:

in TIME SETTING MODE:

longPress hour/minute to enter SETTING MODE; (same as before)
buttonAlarm shortPress: moves you BACK and FORTH between alarm setting and clock setting modes;
buttonAlarm longPress: does nothing:
hour/minute longPress: stores time and takes you to normal display. it would be more logical to enter and exit SETTING MODE the same way.



5)    Please, implement a new flag for alarm not to play if the alarm condition is achieved but if the time has just been set manually.



6)    And if finalized, please remove all hourly specialEffects() and its logic to make the code cleaner.



7)    ** This one is a question: When the alarm is playing,  if you short press buttonAlarm once it goes to snooze. and switches alarm animation off. but then, if you longPress buttonAlarm to switch alarm off, it turns on all 13 LEDs for a fraction of a second before going back to normal display. Is that the intended behaviour?

Go Up