With Instructables you can share what you make with the world, and tap into an ever-growing community of creative experts.
We have a be nice comment policy. Please be positive and constructive.
We noticed you attached photosto your comment.
int mylight = LOW;
int whatever = 13;
int ledpin = 12;
while(digitalRead(whatever)==LOW); //do nothing until button pressed
if (digitalRead(whatever)==HIGH) mylight=!mylight;
i test that last code and working, but how i change output pwm ? i think analogWrite pin A5 pwm,25
and how adding button / or bush second time pwm change to 255 and plink ?
/* Thank you steve for all your help!! */
Arduino Button with no resistor
Arduino - Button With LED
Arduino - Dual Function Button - Long Press/Short Press (Without Delay) + Bonus
Arduino - Getting to know LEDs
Driving Dozens of Buttons
Fully utilize the power of a push button
How to use a Push Button - Arduino Tutorial
First step to your smarthome with Arduino
Control a Large Linear Actuator With Arduino
Understanding the Pull-up/Pull-down resistors with Arduino
Posted:Apr 1, 2013
Join 2 million + to receive instant DIY inspiration in your inbox.
© 2016 Autodesk, Inc.