7

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?

7

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
  • 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

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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