int led = 9; // the PWM pin the LED is attached to
int interruptPin = 2;
int pwm;
void setup() {
// set up the LCD's number of columns and rows:
pinMode(interruptPin, INPUT_PULLUP);
pinMode(led, OUTPUT);
attachInterrupt(digitalPinToInterrupt(interruptPin), InterruptMode, FALLING);
Serial.begin(9600);
}
void loop() {
int value = analogRead(A2);
pwm = value / 4;
analogWrite(led, pwm);
delay(100);
}
void InterruptMode()
{
Serial.println("It final assessment for F2");
}