Snap4Arduino icon indicating copy to clipboard operation
Snap4Arduino copied to clipboard

Consecutive PWM writes are ignored (reported by Joan Güell)

Open bromagosa opened this issue 7 years ago • 3 comments

According to Joan, if you run two consecutive PWM writes, only the first one reaches the board. He is using Snap4Arduino 1.2.4 on MacOSX. He says it all works if he adds a short delay in between blocks:

image

The scripts on the left side are working okay, but the ones on the right side aren't.

bromagosa avatar Nov 10 '17 10:11 bromagosa

Here the same problem, I was going crazy by that! Snap For Arduino 1.2.5 on Windows 10 connected to lilypad through FTDI. If you activates "visible stepping" it works correctly. Only happens every time with desktop version, web version only 1 time every 10 aprox.

RingmasterSpain avatar Apr 26 '18 12:04 RingmasterSpain

Same problem, trying to do consecutive writes to rbg serial leds, some steps are missing, only works if small delays are placed in between blocks.

Snap For Arduino 1.2.7 Windows 7 Arduino UNO R3 with firmata 2.5.8 compiled with arduino IDE 1.8.9

DomAlc avatar Jul 21 '19 15:07 DomAlc

Hi @DomAlc ,

Yes, sometimes these issues appears because we are not programming the microcontroller and so, the asynchronous behavior and the serial communication causes this. It is only happens in some cases... and as you have said, adding small delays (even a "wait 0") the problem goes out.

But, can you test Snap4Arduino 5.0 version ? It is still a RC but it will be released in a few days. Bernat added some changes (some inner delays :) ) to help us in this issue.

Joan

jguille2 avatar Jul 22 '19 12:07 jguille2