i want my buttons to activate their respective leds, but i cant seem to have both buttons in the same unit, any help? i used #define because it was something i saw on a vid, im just trying to make the values work via precise presses, aka, press 1 button first, then the other one
and if yall can help me reset every wrong button press that be great, but its optional
It is not clear what you are trying to do. It seems you want to control 2 LEDs with 2 buttons. You only have one variable for the state and time. You will need one for each LED button pair.
Also this does nothing if ledState is HIGH. Did you mean to toggle it?
its a button press, i want it to stay high until all other values are pressed, and if i cant get all the values working, i cant make the ending toggle, so i keep it like that for now
Your code only works (excluding the errors that have marked you) for one button.
You have a single set of variables for both buttons and due to the program flow they always refer to button 2.
im trying to make BUTTON_PIN_1 be toggled first to then make BUTTON_PIN_2 work as intended, and i figured to try to use do as a statement to be triggered later
im fairly new to this as you can see, that piece of code is to make both buttons work independently from each other, or at least making the value work as a "i press button 1 to activate button 2"
i barely use the library, well, i am new so the library is my second unexplored challenge, but its mostly because im using tinkerkad as my sim to run all the code, and that library is smaller and has nothing im looking for frankly
OK, so if you're new, it's best not to make up your own code syntax by improvising.
You can use your own variable names (.e.g., BUTTON_PIN_1 instead of pushButton or inPin), but don't insert random operators (=) where they don't belong.
This has a vanishingly low probability of being true. It is more likely to be a wiring error, a bad switch or a burnt-out pin on your Arduino.
And what means this:
There is no later. Programs run lines sequentially, there is no statement that means get around to this later. When or how 'xactly should it be executed?