Speaker beep and Wait



  • Same problem occurs with LED and with 3 different M5Stack units.
    Try it out and you will see that after some blinking phase it will stuck up in a permanent light.

    0_1581765871734_Unbenanntes Bild.png

    I think that is a big problem...



  • Hi.That is unusual...Try to upload it on a different device(if you have)and check.



  • Thank you for reply
    I told you I have uploaded it to 3 different devices. Same behavior.
    The timer functionality is implemented buggy. It works only in a normal loop but not with events.



  • @m5stickfreakler Seems a UIFlow bug.You can contect the m5stack group.(Actually I have the same problem on an old device and a new device.They both has the problem.)



  • thank you sysdl132 for confirmation this bug :-)



  • @m5stickfreakler said in Speaker beep and Wait:

    This Code generates no sound or an endless sound but not the expected 1/16 beep each second

    0_1581454695356_Unbenanntes Bild.png

    This flow has issues because it's trying to fire a timer callback at the same time as the 1 second wait, which causes a blocking function. I do get a continuous beep as you describe, but I don't think it's a bug. I would consider it bad code design because you have two functions at 1 second firing at the same time, which causes blocking. You really only need the timer and not the 1 second wait function to achieve a beep ever 1 second.



  • @world101 said in Speaker beep and Wait:

    This flow has issues because it's trying to fire a timer callback at the same time as the 1 second wait, which causes a blocking function. I do get a continuous beep as you describe, but I don't think it's a bug. I would consider it bad code design because you have two functions at 1 second firing at the same time, which causes blocking. You really only need the timer and not the 1 second wait function to achieve a beep ever 1 second.

    As I mentioned earlier, the bug has nothing to do with the "Wait".
    You can check it by yourself:

    :-)

    Of course it is the same behavior.
    Try it out yourself!
    Run the program and wait for some beeps and you will hear a continues tone.
    Its obviously a bug.

    0_1581763635467_Unbenanntes Bild.png

    try it out and you will see what I mean :-)



  • @m5stickfreakler said in Speaker beep and Wait:

    :-)

    Of course it is the same behavior.
    Try it out yourself!
    Run the program and wait for some beeps and you will hear a continues tone.
    Its obviously a bug.

    0_1581763635467_Unbenanntes Bild.png

    I tested this exact flow and let it run for over 20 minutes and I'm still getting beep every 1 second. I have no issues with this flow on the M5Stack Core Grey and M5Stack Fire. I'm using uiFlow 1.4.4 and firmware v1.4.4.



  • @m5stickfreakler said in Speaker beep and Wait:

    Same problem occurs with LED and with 3 different M5Stack units.
    Try it out and you will see that after some blinking phase it will stuck up in a permanent light.

    0_1581765871734_Unbenanntes Bild.png

    I think that is a big problem...

    I have no issues with this flow either. It's been running for more than 20 minutes along with the beep flow on my other m5stack.



  • @world101 said in Speaker beep and Wait:

    I tested this exact flow and let it run for over 20 minutes and I'm still getting beep every 1 second. I have no issues with this flow on the M5Stack Core Grey and M5Stack Fire. I'm using uiFlow 1.4.4 and firmware v1.4.4.

    I have the bug on every device here (3 different units), like user "sysdl132". I also use Firmware 1.4.4 (but its buggy in firmware 1.4.3 also)
    Simply use the "RUN" button and you will have the same UIFlow bug. Dont upload it into the device.



  • This post is deleted!


  • This post is deleted!


  • @m5stickfreakler said in Speaker beep and Wait:

    @world101 said in Speaker beep and Wait:

    I tested this exact flow and let it run for over 20 minutes and I'm still getting beep every 1 second. I have no issues with this flow on the M5Stack Core Grey and M5Stack Fire. I'm using uiFlow 1.4.4 and firmware v1.4.4.

    I have the bug on every device here (3 different units), like user "sysdl132". I also use Firmware 1.4.4 (but its buggy in firmware 1.4.3 also)
    Simply use the "RUN" button and you will have the same UIFlow bug. Dont upload it into the device.

    I tested Run and Download to the device and it made no difference. It still runs longer than 20 mins.

    Your deleted message said something about connecting a device to see the issue. I have noticed bugs when you have Units defined in uiFlow’s UI simulator but don’t actually connect them to the device. If you connect to REPL it should tell you what the error is... typically “unit not found” and the device is locked up. However it’s not obvious because they’re is no on screen error, leaving the user stumped on what the issue actually is.

    If you want additional testing help, you’ll need to post exactly what your entire flow/program looks like, including connections and Units. Obviously there is something unique in your setup that I don’t have, because it’s working for me.



  • @world101 said in Speaker beep and Wait:

    If you want additional testing help, you’ll need to post exactly what your entire flow/program looks like, including connections and Units. Obviously there is something unique in your setup that I don’t have, because it’s working for me.

    from m5stack import *
    from m5ui import *
    from uiflow import *

    @timerSch.event('timer1')
    def ttimer1():
    speaker.sing(220, 1/16)
    pass

    timerSch.run('timer1', 1000, 0x00)

    --> It works if I download it to the device
    --> It does not work if I run it from UIFlow