I was programing this morning then I plug the arduino to upload some code.
But on my computer it start loading the connected and disconnected sound repeated over and over and after that there was no port selection on Arduino IDE.
Do anyone have any idea why and how to fix it?
BTW i am using a Arduino Uno from arduino.
Programing on Arduino IDE2.1
// constants won't change
const int RELAY_PIN = 3; // the Arduino pin, which connects to the IN pin of relay
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin as an output.
pinMode(RELAY_PIN, OUTPUT);
pinMode(A2, INPUT);
Serial.begin(9600);
pinMode(A0, INPUT);
}
// the loop function runs over and over again forever
void loop() {
Serial.println(analogRead(A0));
if (1000 < analogRead(A0))
digitalWrite(3, HIGH );
else
digitalWrite(3, LOW);
}