ED Stripes with Button Interrupts strange behaviour

EgorLED
Posts: 2
Joined: Tue Oct 08, 2019 9:15 am

ED Stripes with Button Interrupts strange behaviour

Postby EgorLED » Tue Oct 08, 2019 9:24 am

Hey guys,

i have this code :https://pastebin.com/DKXYJyYP

The basic logic is:

Press button A to start animation A on LED stripes A, B and C.

For some reason the button presses are not recognized on each boot. Therefore I have to reboot several times until the button presses are registered, and the reset button crashes the whole MC after some presses, so I have to restart the MC again. This is a very big problem for my current project, as it needs to work reliably. Can someone please help me out with the problem?

ESP_Dazz
Posts: 308
Joined: Fri Jun 02, 2017 6:50 am

Re: ED Stripes with Button Interrupts strange behaviour

Postby ESP_Dazz » Tue Oct 08, 2019 12:10 pm

Moderators Note: Moved to ESP32 Arduino forum

boarchuz
Posts: 559
Joined: Tue Aug 21, 2018 5:28 am

Re: ED Stripes with Button Interrupts strange behaviour

Postby boarchuz » Tue Oct 08, 2019 2:39 pm

Try volatile

EgorLED
Posts: 2
Joined: Tue Oct 08, 2019 9:15 am

Re: ED Stripes with Button Interrupts strange behaviour

Postby EgorLED » Tue Oct 08, 2019 2:56 pm

boarchuz wrote:
Tue Oct 08, 2019 2:39 pm
Try volatile
What do you mean exactely, could you please eloberate what I should mark as volatile?

tommeyers
Posts: 184
Joined: Tue Apr 17, 2018 1:51 pm
Location: Santiago, Dominican Republic

Re: ED Stripes with Button Interrupts strange behaviour

Postby tommeyers » Tue Oct 08, 2019 10:42 pm

Google is a good place to begin; unless you want to be spoon fed ;)
IT Professional, Maker
Santiago, Dominican Republic

Who is online

Users browsing this forum: No registered users and 76 guests