Single fade out after button press
this first program please, gentle, goal set code once press button, glows @ full brightness, fades out after let go, test code until feel confident enough move on real project, wire arduino uno sound system of car set of led lights pulse along bass of music, plan use same basic principle code, replace button input parallel line running subwoofers electrical impulse sets off arduino lighting leds bass hits light leds , fade off smoothly, if have input on fantastic, i'll post have far, in honesty copy , paste scrap book reference section of website. right code, arduino fades continuously high low when button not pressed , glows solid when pressed, offer immensly appreciated! code: [select] const int buttonpin = 2; const int ledpin = 9; int buttonstate = 0; int led = 9; int brightness = 0; int fadeamount = 5; void setup() { pinmode(ledpin, output); pinmode(buttonpin, input); } void loop() { buttonstate = digitalread(buttonpin); if (buttonstate == ...