arduino

faketakemake - Primo progetto Potentiometer e Led

board

int ledPin_1 = 10;
int ledPin_2 = 11;
int ledPin_3 = 12;
int sensorPin = 0; // select the input pin for the potentiometer
int sensorValue = 0; // variable to store the value coming from the sensor

void setup() {
pinMode(ledPin_1, OUTPUT);
pinMode(ledPin_2, OUTPUT);
pinMode(ledPin_3, OUTPUT);
}

void loop() {
// read the value from the sensor:
sensorValue = analogRead(sensorPin);
// turn the ledPin on
digitalWrite(ledPin_1, HIGH);
digitalWrite(ledPin_2, HIGH);
digitalWrite(ledPin_3, HIGH);

Syndicate content