My COM port disappeared after I attempted to establish a serial connection between MATLAB and Arduino. It appears that the drivers no longer work. I tried uninstalling the drivers and arduino and reinstalling the drivers and COM3 won't reappear. I've now only got access to COM1 and COM2. Any ideas?
The code I ran is a simple serial test as follows:
/*
Communications Matlab <--> Arduino
Arduino file 1 for use with Matlab file 1
L. Toms
establishContact() routine by:
by Tom Igoe and Scott Fitzgerald
http://www.arduino.cc/en/Tutorial/SerialCallResponse
other ideas from
robot grrrl
http://robotgrrl.com/blog/2010/01/15/arduino-to-matlab-read-in-sensor-data/
*/
int ledPin=A6;
int i = 0;
void setup() {
pinMode(ledPin, OUTPUT);
// start serial port at 9600 bps:
Serial.begin(9600);
digitalWrite(ledPin,HIGH);
establishContact(); // send a byte to establish contact until receiver responds
digitalWrite(ledPin,LOW);
}
void loop() {
Serial.println(i);
i=i+1;
}
void establishContact() {
while (Serial.available() <= 0) {
Serial.println('A', BYTE); // send a capital A
delay(300);
}
}