Beep on delay not working properly


#1

1) Give a description of the problem
I am using SHM Delay Version 2.0. I have a piezo connected to Konnecteed board. I want to beep the piezo on delays (30 seconds).

2) What is the expected behavior?
Beep every two second when delay is on.

3) What is happening/not happening?
I used a for loop to beep every 2 second, but it beeping very fast.

4) Post a Green Snapshot of the pistonimage

5) Attach any logs (From ST IDE and by turning logging level to Full)

7/6/2018, 6:05:02 PM +342ms
+0ms ╔Received event [Home].routineExecuted = ebe9fba9-e8a0-479f-b26d-0b2ab283e753 with a delay of 39ms
+74ms ║Runtime (38286 bytes) successfully initialized in 46ms (v0.3.105.20180628) (73ms)
+75ms ║╔Execution stage started
+135ms ║║Executed [Beep].push (32ms)
+161ms ║║Executed [Beep].push (20ms)
+188ms ║║Executed [Beep].push (19ms)
+213ms ║║Executed [Beep].push (18ms)
+240ms ║║Executed [Beep].push (21ms)
+270ms ║║Executed [Beep].push (19ms)
+296ms ║║Executed [Beep].push (19ms)
+324ms ║║Executed [Beep].push (20ms)
+354ms ║║Executed [Beep].push (22ms)
+379ms ║║Executed [Beep].push (19ms)
+404ms ║║Executed [Beep].push (17ms)
+428ms ║║Executed [Beep].push (18ms)
+455ms ║║Executed [Beep].push (20ms)
+480ms ║║Executed [Beep].push (19ms)
+504ms ║║Executed [Beep].push (16ms)
+530ms ║║Executed [Beep].push (19ms)
+533ms ║╚Execution stage complete. (458ms)
+535ms ╚Event processed successfully (535ms)


#2

I am not at my computer now to fully examine this, but my first observation is the beep is happening approximately every 26 milliseconds… (every two seconds will be about 80 times slower)

Shouldn’t there be some kind of delay in your loop code?


#3

I just updated my code, but it keep beeping. I have a counter, but it never increment.


#4

I am by no means an expert on loops, but 4+4+4 etc will never equal 30…
Perhaps you meant: Until variable is GREATER THAN 30


#5

An issue with timed loops in the cloud: internet network delays and cloud computing delays may occasionally make the results erratic. However, most of the time it will work.


#6

I recently updated the firmware on my Konnected boards and I see that the piezo buzzer has a “siren” capability now. I’ve set a piston to turn it on, but I can NOT figure out how to turn it off! (without going into the ST app and turning it off that way)

I would think this would be perfect for an entry (or exit) beeping tone that you’re trying to accomplish as well.

Any ideas?