Hello
I want to make a code to control the led
when click button the led turn on , when i click button out the led still on
, then when i click the button the led turn off and when i click button out the led still off
sorry for my language and hope to get help
You should look at the example files that come with the arduino IDE.
which one
All of them, starting from the beginning.
Your project is bases on the most basic concepts of electronics and c-programming which are all explained very well in the examples.
If you encounter specific problems, you are welcome to get back to the forum.
But the people here (and everywhere else) don't like it if you have an idea and ask the forum to provide the code/schematics for it.
yes you are right , i should learn more
i made one but i'm not sure
If you post code, please use code tags (the button directly over the - smiley).
You code won't work as you may have noticed.
If you start programming, the first thing you should learn is not to give up too fast when something does not work as expected.
So in order to help you learning this skill, I won't help you with your code ;D
NO I WAS JUST WONDRING IS THIS RIGHT , you are right agian
JUSTKID:
Hello
I want to make a code to control the led
when click button the led turn on , when i click button out the led still on
, then when i click the button the led turn off and when i click button out the led still off
sorry for my language and hope to get help
Usually momentary push buttons is used, but from your description it sounds like you have a button that stays in until pressed again (latching?).
If your code is supposed to turn on with a short push, and stay on until you push button again, then your code isn't the fault, but the type of button you have. To make the button work as a momentary push button you have to doublepush every time so it goes back to open status.