Go Down

Topic: bug with serial port? (Read 3 times) previous topic - next topic

westfw

They added the capability of having the Arduino software environment reset the Arduino processor, so that you would not have to do the little dance of pushin the reset button and hitting the download button within a relatively small time period.  It also makes it possible for the timer period to be reduced that the AVR waits. deciding whether it should run the existing sketch or the bootload code.  Unfortunately, the USB interface chip that the
Arudino uses emulates a serial port, and the initialization that most software does when you "open" the serial port causes the same reset action on the arduino side.


akak1656

Not sure this is relevant, but was able to prevent this reset by setting the DTR within a perl script I was using.  Hopefully this will help somebody with a similar problem talking to the Arduino with perl.

-Dave
---------------------------

#!/usr/bin/perl

use strict;
use Device::SerialPort;


my $port = Device::SerialPort->new("/dev/ttyUSB0");
$port->databits(8);
$port->baudrate(9600);
$port->parity("none");
$port->stopbits(1);
$port->dtr_active(0);

sleep(1);

...

Go Up