1426298_51280144 copy.jpg

Blog

AppleScript DMX Control with Arduino Serial

I have an Arduino with DMX Shield plugged into the computer with USB.

TinketKit's DMX Master Shield comes with SerialToDMX example code. I uploaded it with no changes to the Arduino. This Applescript function will print commands into Arduino's serial window, which you need to have open for this to work. Then the SerialToDMX program will interpret the commands and send out DMX. Simple.

# change this to reflect your serial port
# (found in the Arduino serial window)
set serial_port to /dev/tty.usbmodemfd131


my DMXUpdate(4, 1, 255)

# address, channel, value
on DMXUpdate(a, c, v)
set out to "echo -e '" & (c * a) & "c" & v & "w' > " & my serial_port
do shell script out
end update
Alec SparksApplescript