int analogPin = A0;
int val = 0;
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
pinMode(12, OUTPUT);
Serial.begin(115200);
}
// the loop function runs over and over again forever
void loop() {
val = analogRead(analogPin);
Serial.println(val);
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(12, HIGH);
delay(200); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
digitalWrite(12, LOW);
delay(200); // wait for a second
}