#define LED_PIN 13
#define POTENTIONMETER_PIN 12
void setup() {
pinMode(LED_PIN, OUTPUT);
}
void loop() {
int potval = analogRead(POTENTIONMETER_PIN);
int brightness = potval/4;
analogWrite(LED_PIN, brightness);
}#define LED_PIN 13
#define POTENTIONMETER_PIN 12
void setup() {
pinMode(LED_PIN, OUTPUT);
}
void loop() {
int potval = analogRead(POTENTIONMETER_PIN);
int brightness = potval/4;
analogWrite(LED_PIN, brightness);
}