Go Down

Topic: bug with serial port? (Read 4124 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
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy