July 1Jul 1 A simple way to send serial data to Arduino. I'm sending Data to a Servo Motor...;; Setup TERMINAL (Mac) ;; stty -f /dev/dev/cu.usbmodem1401 9600 raw (defparameter *arduino* (open "/dev/cu.usbmodem1401" :direction :output :if-exists :append :element-type '(unsigned-byte 8))) ;;Function (defun send-byte (n) (uiop:run-program (format nil "printf '%b' \"\\x~2,'0X\" > /dev/cu.usbmodem1401" n))) ;;Test (loop repeat 20 do (send-byte (random 100)) do (sleep 1))
August 14Aug 14 Author For a project, I control servos and relays (as an instrument) via Arduino using LISP — although, of course, the same thing could also be done in MaxMSP (or with other programming environments). I’m a bit familiar with LISP, so I can use it to program structures, timing, rhythms, etc. — or, as in this particular case, a “3D sample space.” I read the elements of this space using different algorithms (boustrophedon, brownian bridge, kNN), essentially generating reading paths, and then send the resulting data/material to the Arduino to control the relays and motors.
Create an account or sign in to comment