0

I ran this code on an arduino now i can no longer upload code or connect to the board i think its stuck in a loop?? my pc picks it up but i cant connect (allready in use error) i unplugged and plugged back in now no error but still cant connect... is their a jumper to restore or???

//no delay... how bad is it??
void setup(){
  //start serial connection
  Serial.begin(9600);
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);
  pinMode(11, INPUT);
//no delay... how bad is it??  
};
int count =0;
void loop(){
  //no delay... how bad is it??
  digitalWrite(8,LOW);
  digitalWrite(9,HIGH);
  int Data = digitalRead(11);
  if (Data==0){
    //no delay... how bad is it??
    while (count!=16){
      Serial.print(digitalRead(11));
      count =count+1 ;
    }
     Serial.println("");
     count=0;
  } 
//no delay... how bad is it??
};
  • What circuit is it connected to? I had the same problem when I put +12v down one of the input pins. – blarg Aug 08 '13 at 11:22

2 Answers2

1

Please refer to this question and answer. I had the same problem with my Arduino.

Either that or just reinstall the drivers. Arduino guide for Windows.

Community
  • 1
  • 1
Georgian
  • 8,795
  • 8
  • 46
  • 87
0

Sometimes the serial port isn't closed properly by your pc and the pc thinks it is still in use.

You can:

  1. reboot your PC
  2. assign another comport to the arduino in the device manager
studioj
  • 1,300
  • 17
  • 32