unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: upro <upro@gmx.net>
Subject: Re: Controlling an external device with elisp
Date: Mon, 05 May 2003 10:13:40 +0200	[thread overview]
Message-ID: <873cjtzu8b.fsf@gmx.net> (raw)
In-Reply-To: 87d6iyru0q.fsf@cs.uga.edu

Ed L Cashin <cashin@cs.uga.edu> writes:

> upro <upro@gmx.net> writes:
>
>> Jonas Steverud <tvrud-usenet@spray.se> writes:
>>
>>> upro <upro@gmx.net> writes:
>>>
>>>> Now this might be a strange question, but is it possible to control an
>>>> external device, through parallel or serial port, using elisp as
>>>> programming language?
>>>
>>> It should be possible if the device has a text-based protocol and
>>> supports a tcp/ip connection. Gnus, which I use right now, does that
>>> to my ISP's newsserver.
>>>
>>> But if you mean on a lower level, if the device is stupid, like an
>>> thermometer or simple motor; I do not know.
>>>
>>> Depends on the device, a bit.
>>
>> Hi Jonas, what I meant was indeed a "stupid" device, like a selfmade
>> small circuit to switch on a light or somolar (as seen in the Coffee
>> mini-HOWTO).
>>
>> Do you think this is impossible?
>
> No, it's perfectly possible.  The thing is that you can *use* the
> device from emacs but ultimately talking to hardware is a kernel
> thing.  Assuming Linux, as your reference to the Coffee mini-HOWTO
> would suggest, your choices are to ...
>
>   * build the circuit to recognize codes you can send using an
>     existing driver
>
>     e.g., you could put the device on your first serial port and
>     control it from emacs by writing strings like "please turn on the
>     light" or numbers like 101 to /dev/ttyS0.
>
> or
>
>   * use IO primitives or write your own driver as suggested in the
>     Coffee mini-HOWTO

Are these IO primitives in C? I don't really understand this. 

I prefer the second suggestion, since I have very few knowledge of how
to build circtios (not to speak of how to recognize signals...)

Thank You In Advance!

>
> The former option is probably a lot easier in software; the latter is
> probably easier for you in terms of circuit design.

-- 
Michael

r-znvy: zvpunry.wryqra  jro.qr (chg gur "@" jurer vg svgf...)
ab fcnz cyrnfr

  reply	other threads:[~2003-05-05  8:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-04 17:16 Controlling an external device with elisp upro
2003-05-04 18:52 ` Jonas Steverud
2003-05-04 19:50   ` upro
2003-05-05  0:48     ` Bijan Soleymani
2003-05-05  2:45     ` Ed L Cashin
2003-05-05  8:13       ` upro [this message]
2003-05-05 15:57         ` Ed L Cashin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=873cjtzu8b.fsf@gmx.net \
    --to=upro@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).