«

»

May 04

Print this Post

Serial Communication in Mac OS X

The year I moved to Univerity, I decided to give UNIX a try. My first approach to a UNIX Operating System was Ubuntu.
It was cool, easy to use, and I really liked it. The migration to a new OS is never easy… And it was not! There are many differences, but as long as you have Google to search, you find your way easily.
I needed a notebook and I had a chance to buy a MacBook. I couldn’t be happier!

Some days after, I needed a way to receive the Serial data from Arduino into the Terminal.
Of course, Google helped and here is the answer for future reference:

First, open Terminal (Applications/Utilities/Terminal).
Now you need to find the Arduino’s serial port. To get a list of your serial ports, type

ls /dev/tty.*

Then, pick the one that contains “/dev/tty.usbserial”

Let’s take this as an example: “/dev/tty.usbserialABC123″

To start serial communication with the port (at 9600 baud-rate), simply run this command:

screen /dev/tty.usbserialABC123 9600

To quit, type control-A, then control-\.

I hope this will help someone…

About the author

Ricardo Dias

Ricardo Dias was born in Entroncamento, Portugal and is studying Electronic and Telecommunications Engineering at University of Aveiro. He is a researcher in robotics and is currently the Team Leader of CAMBADA@MSL team. As a hobby, he is also a freelancer Stage Lighting Designer.

Permanent link to this article: http://ricardo-dias.com/2010/05/04/serial-communication-in-mac-os-x/

Leave a Reply

Your email address will not be published. Required fields are marked *