[plt-scheme] Reading voltages on a serial port...

From: geb a (geb_a at yahoo.com)
Date: Sat Aug 5 02:07:46 EDT 2006

Maybe this is way off topic but here goes... What I
would like to do is to read the voltage of a pin on
the serial port so that if the pin reads high it
returns a boolean value (positive or negative logic is

Can someone point me in the right direction?  The
following program yields nothing when run...

(define serial (open-input-file "/dev/ttyS0"))

(define (read-loop in-port)
  (display (read-line in-port))
  (read-loop in-port))

(read-loop serial)

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

Posted on the users mailing list.