Go Down

Topic: Need help to finish the code (Read 5586 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?

wvmarle

#55
Jan 16, 2018, 04:29 pm Last Edit: Jan 16, 2018, 04:30 pm by wvmarle
Should be complete now.
Hope no more issues popping up!
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.

wvmarle

Let me know when all is fine, then can clean up those #ifdefs that I added.
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

#57
Jan 16, 2018, 06:21 pm Last Edit: Jan 16, 2018, 08:06 pm by arduinoware
Let me know when all is fine, then can clean up those #ifdefs that I added.
Just did the test. Still got a few issues with it:

Alarm lights and sound now work. (Although there is still some weird noise coming from buzzer in the background, like grinding, but low pitch clicky or grinding noise.) but not a major issue probably.

Issue 1.

buttonAlarm LongPress while in Setting MODE, activates or deactivates the alarm? I thought we reserved that only for normal display? Because you said it didn't make sense to allow that in setting mode.

Issue 2.

Are you sure you made the flag for the alarm? Because if you are in Setting Mode, and set the same time for alarm and the same time for clock, (in other words, if alarm and clock times match) and then if you start moving back and forth between the 2 setting modes (alarm and clock) the alarm goes off. so it probably resets seconds while you are still in setting modes and the flag doesn't work. or something like that.

Issue 3.

If you press the snooze button (buttonAlarm shortPress) while the alarm is playing and while the beep is ON (sounding), then the beep goes crazy, like beeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeep, non stop. But if you press snooze button, while the alarm sound is in the pause, it doesn't happen.

*******
Issue 4.

Please see if you can put in a feedback such as "beep beeeeeep" for alarm setting mode. So the user knows he is in alarm setting and not the clock setting. like a half-second beep, half-second pause, and 1 second beep. as feedback, for alarm setting entrance. But I don't know how that will go with the 500ms delay that you put there previously. for entering the setting mode. I hope the noises will not interrupt each other.

Or may be, you can think of a better feedback for alarm setting mode?

Minor issue (5)

I noticed the display changes too quickly between alarm setting mode and clock setting mode. I think there is not even 50ms. would be nice to get a very quick "all LEDs OFF" between clock setting and alarm setting mode transitions in SETTING MODE.

******
Also, you did not answer one of the questions in the previous message. Probably just forgot. When alarm is playing, and you longPress alarm button to switch off alarm, all LEDs turn on briefly. why is that happening? a bug?

Thank you.

hopefully, this time we can nail it. :)

Cheers.

arduinoware

Hi.

In addition to my previous message;

Please remove the sounds of buttons, if you can't find the cause of echoing. It is annoying. if you press the hour or minute buttons in quick successions, (probably, the same for the other buttons, but I haven't checked) they will produce a clicking noise from the buzzer. My buzzer is OK, I have replaced the buzzer and tested another one. Still the same. Something must be wrong with the code or with checking of buttons probably. anyways,

So, if you can't find it, then please just remove the sounds of buttons. it was nice to have button sounds, but it is faulty.

Thanks.

wvmarle

Try again.
Probably some issues still, can continue tonight. Most should be fine now.
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.

Go Up