Interfacing with SerialPortX

Hello All,

I'm trying to write a script on AppleScript that reads from the serial port and when it receives certain characters from Arduino, it will do certain tasks, things such as increasing/decreasing the volume on my laptop, which is a mac.

I am able to create the resultant scripts, but I haven't figured out how to read the data from the Arduino. I was using AppleScript Proxy, but it is very buggy. I have the SerialPortX installed on my laptop. I do not understand/know how to read the data from the Serial Port. I currently have the outputs from the as characters.

Could someone give me a hand?

Thanks in advance!

I don't know anything about Apple computers (I can't afford them) but a common problem is that PC code does not take account of the fact that the Arduino resets when the serial port is opened. The PC needs to allow time for the reset process to complete before sending any data - or expecting to receive any.

You can see how I deal with it in this Python demo.

I am assuming you are using an Uno or Mega. A Leonardo is a little different.

...R