int button = 2;
int led = 10;
int pot = A0;
void setup() {
// put your setup code here, to run once:
pinMode(button, INPUT);
pinMode(led, OUTPUT);
pinMode(pot, INPUT);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
bool btnState = digitalRead(button);
Serial.println(btnState);
if(btnState == HIGH){
int potValue = analogRead(pot);
int MappedPotValue = map(potValue, 0, 1023, 0, 10);
for
}
}