Pages: [1]   Go Down
Author Topic: Arduino + Applescript quick fix...  (Read 1024 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So, tonight I wanted to know if someone was trying to IM me while I was in the other room (important stuff, you know...). Searching for arduino/applescript stuff didn't turn up too much other than people searching for the same in a few forums or blog posts. And, not that this is especially smart of me, but I thought I'd post it here anyway. I based my arduino code off of the serial_comm_basic sketch just w/ a little more fun flash fadiness. Then I found the todbot.com arduino-serial command line tool:

http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/

at which point it becomes very easy.. in Applescript do something like this:

do shell script "/Applications/arduino-0007/serialCommand/arduino-serial -b 19200 -p /dev/cu.usbserial-0B2 -s H"

and that's it. You can process info, create UIs, even read in info from arduino using shell commands like that in applescript and applescript studio.

I downloaded iCAR (iChat Auto Reply) and executed the applescript from there (it also does shell commands, but I didn't realize that until after I did this).

So, yeah, not rocket science, but if you're looking for a quick and dirty Applescript / Arduino combo - that may work for you.

Thanks..

-Jeremy
Logged

Pages: [1]   Go Up
Jump to: