this post was submitted on 21 Aug 2026
8 points (100.0% liked)

Arduino

543 readers
5 users here now

Arduino is an open-source electronic prototyping platform enabling users to create interactive electronic objects.

founded 3 years ago
MODERATORS
 

Hello Friends :)

I've been re-teaching myself Arduino to brush up on my C/C++ and I've been working on this project for a simple adding machine with two user inputs and a single visual output. I'm not sure what is wrong with my code.

As it stands, the code compiles without error or warning and runs on my Uno R3, but as soon as I press "NumberEntryButton" to begin building the first number, pin 13 immediately flashes 8 times, then stays solid on.

If anyone has advice or help to offer, I'd super appreciate it.

I've attached a permalink to the file in my git repo.

you are viewing a single comment's thread
view the rest of the comments
[โ€“] okwhateverdude@lemmy.world 2 points 1 week ago (1 children)

So the first thing I can recommend for you to try is to write out, line by line, in plain text what you expect the program to do at that point in the program and what the current state is of the program at that point.

You're making some code idioms that are more complex than they should be which is likely leading to the mismatch in your expectation vs. actual program execution. Simplify those bits, use more temporary variables. Very likely your read loops are not doing what you think they should be doing.

Thank you for your feedback ๐Ÿ™