neskweek / LightSaberOS

Operating System for Arduino based LightSaber
Creative Commons Zero v1.0 Universal
80 stars 25 forks source link

Single button mode is not behaving correctly #69

Closed azsde closed 7 years ago

azsde commented 7 years ago

When running from 5V usb power source, a single press on the main button is most of the time interpreted as a long press, and some times as a short press.

I have tried tweaking time values but I still get inconsistent behavior.

The behavior is even worse when powered with a 3.7V battery.

How can I fix this ?

Edit:

Here is a video of the issue https://youtu.be/hSMBOIPznq0

And here is my wiring for the button: http://image.noelshack.com/fichiers/2017/30/7/1501438482-button-issue.jpg

jbkuma commented 7 years ago

I've only ever used batteries or a 3.7v wall supply and have never seen this.

On Jul 30, 2017 12:55 PM, "Azsde" notifications@github.com wrote:

When running from 5V usb power source, the button is behaving just fine, but when running on a 3.7V battery, a single press is interpreted as a long press.

Is it normal ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/neskweek/LightSaberOS/issues/69, or mute the thread https://github.com/notifications/unsubscribe-auth/ATdCMO4yu906BxBCKii8wp1dm_2sKV5lks5sTLWcgaJpZM4Onr8o .

azsde commented 7 years ago

@jbkuma sorry for the inconvenience, it seems indeed that the observed behavior isn't related to the power supply, but rather to the arduino capacity.

When I load up to 90% or more of its program memory, it behaves very weirdly.

Maybe it is due to the fact that the arduino is a clone and not a genuine one.

azsde commented 7 years ago

This issue can be closed, I figured out that the ticks had to be adapted.