Ah, OK. It seems fairly straightforward:

(system "stty -F /dev/ttyACM0 115200 crtscts")

(define out 0)
(set! out (open-output-file "/dev/ttyACM0" #:mode 'binary #:exists 'append))
;(set! in  (open-input-file  port-name #:mode 'binary))
(file-stream-buffer-mode out 'none)
(write-byte whatever out)

(close-output-port out)

On Thursday, 23 September 2021 at 18:31:53 UTC+1 Zeta Convex wrote:

>
> How do I write to a serial port? I'm on Linux, and want a baud rate of 
> 115200.
>
> I'm new to Scheme. I can't seem to find a library to do what I want.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/2ee59fe3-1543-4fea-80ea-a03cc72aa014n%40googlegroups.com.

Reply via email to