as corona has forced at homeschooling, I have seriously struggled with coding in general. I am not getting the hands-learning I need to understand these concepts and the videos my teacher has sent me are giving me some context to what to do, but I still feel lost. We have a simple project where we are supposed to design code for a state machine using "case". The state machine should toggle an LED while also having a countermeasure against it bouncing. I can get state machine without "case" that makes an LED toggle on and off, but I can't seem to think of a way to do it with "case". I was hoping anyone could give me a rundown to how I should be going about this assignment as it will be used for a future project.
Show us what you’ve got so far.
Use code tags.
(I’ve never seen a LED bounce - what did you mean by that?)
Please also remember to use paragraph breaks.
May be you can use google translate to read my tutorial on state machines
I’m using there the OneButton library from Matthias Hertel which is state machine based if you read his documentation
give me a rundown to how I should be going about this assignment
I’m not giving the game away for a school assignment since the answer is already published and OP just didn’t find it but look at example 4 here.
(But also wondering what the bouncing thing is?)
I think what he may mean by ‘bouncing’ is falling through the case because of a missing break statement.