sarahghp / p5bots

Use your microcontroller with p5.js
GNU Lesser General Public License v2.1
199 stars 45 forks source link

pin.blink increment #20

Closed naimenz closed 7 years ago

naimenz commented 7 years ago

I think I may have spotted an issue with led blinking. In the pin.blink function, the blinkCounter is incremented AFTER sending the id with the current blinkCounter. This means that when pin.noBlink() is called, the id it gets is one greater than the id of the blinking led. For some reason it still worked the first time you turned the blinking on/off, but after that it wouldn't work. Simply moving the increment to before the function fixed it for me. I hope this helps :)

sarahghp commented 7 years ago

bitmoji

Thanks for noticing that one.