Author Topic: Read serial port snippet  (Read 1765 times)

0 Members and 1 Guest are viewing this topic.

divtiply

  • Guest
Read serial port snippet
« on: August 26, 2014, 02:29:34 PM »
For those who need it:

(setq com (open "\\\\.\\COM1" "r"))
...
(close com)

hmspe

  • Bull Frog
  • Posts: 362
Re: Read serial port snippet
« Reply #1 on: August 26, 2014, 04:25:54 PM »
Is there similar syntax for stdin (keyboard)?
"Science is the belief in the ignorance of experts." - Richard Feynman

divtiply

  • Guest
Re: Read serial port snippet
« Reply #2 on: August 26, 2014, 06:17:53 PM »
Is there similar syntax for stdin (keyboard)?

Short answer: NO.

Long answer: yes, but only for _console_ applications (which AutoCAD is not) - there are CONIN$ and CONOUT$ device files.

hmspe

  • Bull Frog
  • Posts: 362
Re: Read serial port snippet
« Reply #3 on: August 26, 2014, 09:07:17 PM »
Thanks.  I was hoping for an easy way to read the keys that grread does not return.
"Science is the belief in the ignorance of experts." - Richard Feynman