Go Down

Topic: Mac Serial Applications (Read 866 times) previous topic - next topic

raysl

Most places seem to recommend ZTerm for use with the Arduino when on OS X (I'm running 10.5) but it seems like ZTerm has been kinda stale for some time, and rather not fork over $ for A) a dead product and B) for working on OS hardware :)

I was wondering if anyone used anything else. I am not fearful of running any X11 apps or even console apps... I just want something good and open source!

Ray

westfw

I used "minicom", one of the standard open source unix things.  I think it's a standard part of the developer tool or maybe the X11 install?  Mine lives in /sw/bin, and I don't recall having to install it manually.
It works fine.



kg4wsv

I think /sw is the root of the fink installation tree.  It's not on my mac, and I have the developer stuff loaded.

I'm a dinosaur - I still use kermit.  It was good enough for the Commodore 64...

-j


westfw

Could be; I do have some fink stuff installed.  It was part of the "work" linux distribution that I had used recently, so it seemed natural to use it on macos as well..

Kermit brings back memories;    Did you find macos-ready kermit, or did you have to modify/build it?


raysl

I do have minicom installed, so I'll give that a whirl... good call :) as for kermit.. wow that brings back memories, not all fond ;) but I'll spark that one up too and see which one I like better.

I found a python serial modual which gives me all sorts of scripting capabilities that I didn't think of before, I'll report back if I have any success.

(ps, my arduino is shipping right now)

Ray

kg4wsv

Quote
Did you find macos-ready kermit, or did you have to modify/build it?

Got a standalone binary from somewhere, but it's been so long I don't recall where.

-j


raysl

Its available via macports and probably fink as well.

mellis

I use screen.  

screen /dev/tty.<whatever> <baud rate>

ctrl-a k to quit.

peterloron

Quote

I found a python serial modual which gives me all sorts of scripting capabilities that I didn't think of before, I'll report back if I have any success.


You can also easily do serial I/O from perl on the Mac. I have been logging some data from my Arduino with the code below. I based it heavily on a snippet I Googled...

Code: [Select]

#!/usr/bin/perl
use Device::SerialPort 0.12;

$LOGDIR    = "/Users/peterl/Projects";              # path to data file
$LOGFILE   = "plant.log";            # file name to output to
$PORT      = "/dev/tty.usbserial-A20e1evB";          # port to watch

# Serial Settings#
$ob = Device::SerialPort->new ($PORT) || die "Can't Open $PORT: $!";
$ob->baudrate(9600)   || die "failed setting baudrate";
$ob->parity("none")    || die "failed setting parity";
$ob->databits(8)       || die "failed setting databits";
$ob->handshake("none") || die "failed setting handshake";
$ob->write_settings    || die "no settings";

# Send a string to the port
$pass=$ob->write("AT");
sleep 1;

# open the logfile, and Port

open(LOG,">>${LOGDIR}/${LOGFILE}")
   ||die "can't open smdr file $LOGDIR/$LOGFILE for append: $SUB $!\n";

open(DEV, "<$PORT")
   || die "Cannot open $PORT: $_";

select(LOG), $| = 1;      # set nonbufferd mode

# Loop forver, logging data to the log file
while($_ = <DEV>){        # print input device to file
     $theTime = `date`;
     chomp($theTime);
   print LOG $theTime . " - " . $_;
}

undef $ob;

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