Compilation failed on web editor Ardujno

Hi,

I have read the last post: Topic: Compilation failed.
trying to find some help i found
http://forum.arduino.cc/index.php?topic=553932.0
https://forum.arduino.cc/index.php?topic=449201.15

however i still have teh problem :o :confused:

I have a easy code, which run perfectly in arduino desktop , but i show Compilation failed in Arduino Web
I have a Bord Arduino uno, Ubuntu system, MQ7 sensor

this is the online code

I wil appreciate any help

// Digital pin 9 will be called 'pin8'
int pin9 = 9;
// Analog pin 0 will be called 'sensor'
int sensor = A0;
// Set the initial sensorValue to 0
int sensorValue = 0;

// The setup routine runs once when you press reset
void setup() {
// Initialize the digital pin 8 as an output
 pinMode(pin9, OUTPUT);
// Initialize serial communication at 9600 bits per second
 Serial.begin(9600);
}

// The loop routine runs over and over again forever
void loop() {
// Read the input on analog pin 0 (named 'sensor')
sensorValue = analogRead(sensor);
// Print out the value you read
 Serial.println(sensorValue, DEC);
// If sensorValue is greater than 500
 if (sensorValue > 500) {
// Activate digital output pin 9 - the LED will light up
   digitalWrite(pin9, HIGH);
 }
 else {
// Deactivate digital output pin 9 - the LED will not light up
   digitalWrite(pin9, LOW);
 }
}

I just compiled your code for the Uno and it worked fine for me. Please try again in case it was a temporary issue with Arduino Web Editor that has been resolved.

If not, please provide the full error output:

  • When you encounter an error, you'll see a button that looks like two pieces of paper at the top right corner of the black console window at the bottom of the Arduino Web Editor. Click that button.
  • In a message here, click the code tags button (</> on the forum toolbar) and then paste the error.

If the text exceeds the forum's 9000 character limit, save it to a text file and post it as an attachment. If you click the "Reply" button here, you will see an "Attachments and other settings" link.