void loop()
{if (0 > 120){
digitalWrite(1, HIGH);
digitalWrite(2, HIGH);
}
}
// the setup routine runs once when you press reset:
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
}
// the loop routine runs over and over again forever:
// read the input on analog pin 0:
int sensorValue = analogRead(A0);
// print out the value you read:
(Serial)(println)(sensorValue);
delay(1); // delay in between reads for stability
}
}
else
{
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT) ;
pinMode(12, OUTPUT) ;
}
// the loop function runs over and over again forever
void loop() {
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
digitalWrite(12, HIGH);
delay(100);
digitalWrite(12, LOW);
delay(100);
digitalWrite(11, HIGH);
delay(100);
digitalWrite(11, LOW);
delay(100);
digitalWrite(10, HIGH);
delay(100);
digitalWrite(10, LOW);
delay(100);
digitalWrite(9, HIGH);
delay(100);
digitalWrite(9, LOW);
delay(100);
}
}
Here are the error reports:
(Serial)(println)(sensorValue);
^
sketch_nov08a:19: error: expected constructor, destructor, or type conversion before '(' token
delay(1); // delay in between reads for stability
^
sketch_nov08a:20: error: expected declaration before '}' token
}
^
exit status 1
expected constructor, destructor, or type conversion before '(' token