Skip to content
Chris Petersen edited this page Oct 16, 2014 · 1 revision

serial-timeout returns #t if a serial timeout has occurred.

Example

Example 1: Sending function from apps/SerialDemo/main.scm

(let loop ((m (u8vector->list (string->u8vector buf)))(err #f))
  (if err 
   (begin (set! serialport #f) (glgui-widget-set! gui open-button 'color Red))
   (if (fx> (length m) 0) (begin
     (serial-writechar serialport (car m))
     (loop (cdr m) (or (serial-error) (serial-timeout)))
    ))
  ))
Clone this wiki locally