I have tried with two leonardos to get some serial I/O with the monitor and so far nothing. I can upload programs (blink, etc). When I upload the following with the while enabled, I get nothing--no serial output, no blinking. If I comment out the while, the led blinks. Any suggestions? (besides going back to the uno)
//Leonardo test 1 -- check serial i/o
void setup(){
Serial.begin(9600);
pinMode(13,OUTPUT);
// while(!Serial);
}
void loop(){
int i;
Serial.println("Ready:");
for(i=1;i<11;i++) {
digitalWrite(13,HIGH);
delay(500);
Serial.println(i);
digitalWrite(13,LOW);
delay(200);
}
}
Already tried it. It still doesn't work. Whenever the while is enabled, the program never gets out of setup. Yet comm is okay since I can upload programs. I am at a loss.
UPDATE
The leonardo talks to the serial monitor on an XP machine. So my question is now: How do I get it to talk the serail monitor on my windows 7 machine????
It works either way. In any case, the problem appears to be with windows 7. The leonardo communicates with an XP laptop, but not windows 7 via the serial monitor. I can upload to it with Win 7.
This may sound odd, but try changing this setting in your Serial object in your application:
RtsEnable =True
and try again.
I found the same issue on my (arg - Vista) machine, where it would work fine when talking with the Arduino serial monitor, but not my application. I created a simple print and receive set of apps, and they didnt work. I then updated the RtsEnable setting and amazed it started working.
This may sound odd, but try changing this setting in your Serial object in your application:
RtsEnable =True
and try again.
I'm not sure it applies. The problem is between the leonardo and the arduino serial monitor. Where would I put the code you suggest? It looks like code for an external program. Agian it is apparently a Windows 7 problem because I can see the leonado in XP.