I've been dealing with a school project in the last couple of weeks, but I've encountered an specific problem that I'm stuck with. In the project we have to make a pill machine, and for that we have to set a timer. When the timer's hour and the actual hour are the same, a message has to be sent to Arduino. My progress so far is the following one:
The thing is that if I select an specific hour and minute, I want a message to be sent (JUST ONCE) when, in the clock, it shows that time. But that doesn't happen as the message is sent 60 times. My hypothesis is that this happens because a specific minute matches up (in bouth) for 60 seconds; thus, the message is sent 60 times.
Please help me find a way in which the message is sent just once.
It doesn't work that way. It just does nothing. In the previous situation, I saw that the message, at least, had arrived as I have some LEDs that light up. Now nothing happens. Just in case, this is the current state:
You might be missing a trailing zero on the seconds, or overshooting the exact match moment.
There is a FormatTime block in the Clock that you can use to force double digits, and avoid that five-way JOIN. (You already use that, I see.) So if you ask the Time picker for an Instant, you can compare two FormatTime results.
If the seconds don't help, you could avoid the extra 59 hits by also disabling the associated button when you get the match, to make subsequent tests fail the AND.
As you can see, I have done some small changes in the proyect. Now, I've added an additional button that would set the Button.Enabled to, once again, true. I am extremely grateful to say that, because of your help, now, the proyect works. There is a small thing, though.
If, for instance, I click in the button 3, and, afterwards, I select the hour (and when the actual hour and the hour set match), it still sends the same message (called "A") that would send in case I had selected button 2. In this case, the message that it would have to send would have to be "E".
The blocks in the aia project are different from the blocks shown here. There you have each sending procedure in a different clock. Here you show two procedures in one timer. Why use multiple clocks when you can do it with one clock?