Livecode Arduino

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
GSA_DC
Posts: 35
Joined: Thu Nov 27, 2014 2:07 pm

Livecode Arduino

Post by GSA_DC » Tue Mar 24, 2015 3:50 pm

Hi.

(not sure what happened - I posted something on this a few hours ago and it has vaporised. Anyways...)

I have a student who is trying to control a simple Arduino board to switch lights and trigger thing from a desktop Livecode application. We're having trouble in communicating with the Arduino. When we try to open the driver as normal, it hangs. We're using OS X Yosemite and standard Arduino Uno and Livecode 7.0.1 community.

I see from searching there are issues with this from version 7 update. But it appears to have been resolved. But we just can't make it work.

Any help appreciated - thanks.

Kind regards, Paul.

andrewferguson
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 184
Joined: Wed Apr 10, 2013 5:09 pm

Re: Livecode Arduino

Post by andrewferguson » Tue Mar 24, 2015 9:57 pm

GSA_DC wrote:I see from searching there are issues with this from version 7 update. But it appears to have been resolved. But we just can't make it work.
I posted on this issue less than a month ago, and although Quality Control Center Bug ID 12545 has been marked as RESOLVED FIXED, it has not (at least for me). To solve this issue I simply downgraded to LiveCode 6.5.2, although I suspect that later versions of LC 6 will work as well. In LC 6.5.2, things just worked for me.

One thing to note (which caused me trouble before I figured it out) is that the Arduino will reset when you open the driver. In other words, you cannot open the driver and then immediately begin communication with the Arduino, you must wait until the Arduino is ready, which is only about a few seconds.

Another useful tip I found - although have not tried yet - is to open the port for binary update. I believe that this will allow you to both send and receive data from LiveCode, without closing and re-opening the port, which as mentioned above, restarts the Arduino.

Hope this helps,
Andrew

GSA_DC
Posts: 35
Joined: Thu Nov 27, 2014 2:07 pm

Re: Livecode Arduino

Post by GSA_DC » Tue Mar 24, 2015 11:37 pm

This is a great help. I'll check in a pre 7 version. And I appreciate your tips.

Thanks a million!

Kind regards, Paul.

Post Reply