hello I am currently new to the Arduino and am starting to learn the code with the starting with electronics tutorial. I wrote the code for the if and else statement but the led wil light up for a split second and then turn off imideatly???? I copied his example after mine didn't work and it ended up with the same result?? im trying to get it so that a or A will light the LED while anything else will turn it off but all I get is a split second where the led will flash?? at first I though it was where the parethesis were located? Please help me understand
Please use code tags (</> button on the toolbar) when you post code or warning/error messages. The reason is that the forum software can interpret parts of your code as markup, leading to confusion, wasted time, and a reduced chance for you to get help with your problem. This will also make it easier to read your code and to copy it to the IDE or editor. If your browser doesn't show the posting toolbar then you can just manually add the code tags: [code]``[color=blue]// your code is here[/color]``[/code]
Using code tags and other important information is explained in the How to use this forum post. Please read it.
Code tags: Type [code] before the first line of code, type [/code] after the last line.
If you right click in the editor window and select "Copy for Forum" you can then paste it from your clipboard into your reply, tags will be automatically included.
Or: