Can't view Serial.print from setup()
this doesn't seem issue arduino itself, i'm having following problem. started using arduino week, , i'm familiar c-based languages (php specifically) shouldn't coding problem.
i print line of code each time arduino starts. easy:
the problem not whether happening (the tx light flashes once during startup know it's being sent), problem can't see happening following 2 reasons:
1. can't open serial monitor until after arduino physically connected computer, miss first output (all output loop() shows fine)
2. when using terminal screen
i'm confused how i'm supposed able see first message sent during setup() if can't connect screen before function runs?
i'm running osx mountain lion arduino micro.
i print line of code each time arduino starts. easy:
code: [select]
void setup() {
serial.begin(9600);
serial.println("hello world");
}
the problem not whether happening (the tx light flashes once during startup know it's being sent), problem can't see happening following 2 reasons:
1. can't open serial monitor until after arduino physically connected computer, miss first output (all output loop() shows fine)
2. when using terminal screen
code: [select]
screen /dev/tty.usbmodem621
unplugging , replugging in arduino looses original connection , nothing new output, same result pressing reset button.i'm confused how i'm supposed able see first message sent during setup() if can't connect screen before function runs?
i'm running osx mountain lion arduino micro.
since micro, leonardo, uses software usb instead of hardware usb-to-serial adapter need add code:
http://arduino.cc/en/guide/arduinoleonardo
"this change means if you're using serial print(), println() or write() statments in setup, won't show when open serial monitor. work around this, can check see if serial port open after calling serial.begin():
http://arduino.cc/en/guide/arduinoleonardo
"this change means if you're using serial print(), println() or write() statments in setup, won't show when open serial monitor. work around this, can check see if serial port open after calling serial.begin():
code: [select]
serail.begin(9600);
// while serial stream not open, nothing:
while (!serial) ;
Arduino Forum > Using Arduino > Project Guidance > Can't view Serial.print from setup()
arduino
Comments
Post a Comment