I am having trouble with this code that I wrote.>:( . Whenever I verify, I get this error code: exit status 1
Could someone please tell me where I've gone wrong? Thanks.
// These constants won't change:
const int sensorPin = A0; // pin that the sensor is attached to
const int sound = 4; // pin that the LED is attached to
const int sensorValue = 1000;
const int threshold = 400; // an arbitrary threshold level that's in the range of the analog input
void setup() {
// initialize the LED pin as an output:
pinMode(sound, OUTPUT);
}
void loop() {
// if the analog value is high enough, turn on the LED:
if (sensorValue > threshold) {
digitalWrite(sound, HIGH);
} else {
digitalWrite(sound, LOW);
}
}
Moderator edit: </mark> <mark>[code]</mark> <mark>
I have previously been able to verify code and upload it to an Arduino Uno, but today, everything is getting that error. I just tried with some code that I could verify last week and it is getting the same error.