void setup() { Serial.begin(9600); //Set serial baud rate to 9600 bps pinMode(LED_BUILTIN, OUTPUT); } void loop() { int val; val=analogRead(0);//Read Gas value from analog 0 Serial.println(val);//Print the value to serial port delay(100); if (val>200) {digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) delay(100); // wait for a second digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW delay(100); // wait for a second } else {digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW delay(1000); // wait for a second }