Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am actually using Cygwin, but it is my understanding that it responds to Unix commands so hopefully I am in the correct place.

I have an Arduino hooked up via USB to my LapTop for data reading.

I want to be able to simultaneously be able to output the serial port data to the shell for my viewing and also save all that data as a text file.

Is there a command I can use to do this?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

The command tee duplicates its input onto several output streams.

Cygwin presents serial ports as /dev/ttyS0, /dev/ttyS1, … corresponding to Windows's COM1, COM2, … (there's an offset of 1).

Figure out which serial port number Windows assigns to your serial device. Say the device is COM4:

tee </dev/ttyS3 serial-log.txt
share|improve this answer
    
One other thing, I was thinking of doing another thread on this, but I decided not to since it is directly related to this question. I want this command to be scheduled at a certain time. How can I do this since the AT command for cygwin has been deprecated? I tried echo "test" | at 17:50 but I get the error: please use schtasks.exe instead –  l3win Apr 12 '13 at 0:54
    
@l3win That's a Cygwin question, and I can't help you with this one. –  Gilles Apr 12 '13 at 9:30
    
I tried this out and I discovered that both "at" and "schtasks" are Windows programs. If there's an "at" for cygwin, we'd have to figure out which package it is in. –  gbarry May 9 '13 at 22:52
    
@l3win : even in CygWin you can simply use crontab to schedule. See this : unix.stackexchange.com/q/72143/38817 –  DavAlPi Jun 11 '13 at 15:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.