So, my goal is to do that, if the button is pressed, an LED will light at an intensity controlled by a potentiometer. However, it doesn't work (the button part, I think). Here's my code :
int buttonPin = 7;
int ledPin = 9;
int potPin = A0;
Please read the post at the start of any forum , entitled "How to use this Forum".
OR http://forum.arduino.cc/index.php/topic,148850.0.html.
Then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
How do you have your button wired?
Between input 7 and 5V?
If so do you have a 10K resistor between input 7 and gnd?