Hi everyone,
After looking into this for a few hours without any result, I decided to ask for help...
I want to use my UNO to show me how many unread emails if have within OSX Mail.
Here's what I did so far:
Create an AppleScript that shows me the number of unread mails
Create a Processing sketch that tells Arduino to blink an LED
What's missing is the link between AppleScript and Processing or a direct link between AppleScript and Arduino. I tried SerialPortX but it seems not to work with macOS Sierra. I get the message that the script does not understand the message "serialport list".
When you have figured out how to get the Mac to send data to the Arduino you should have a look at the examples in Serial Input Basics - simple reliable ways to receive data.
Do you have experience with SerialPortX and newer OSX versions? I put "SerialPort X.osax" into /Library/ScriptingAdditions/
Here's an excerpt of the code where I get the error now on the serialport open command:
global myPort
on run
set use_port to "/dev/cu.usbmodem1411"
set myPort to serialport open use_port bps rate 9600 data bits 8 parity 0 stop bits 1 handshake 0
end run