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
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);
}
}