New user

Pi Digital sean at pidigital.co.uk
Fri Dec 24 16:08:27 EST 2021


I’m refitting the bathroom and laying new carpet in the upstairs hallway, so have Hol Dom Dues too ;)

Arduino will be basically the same as any other IO with the added benefit that you have control over the controller by your own Arduino coding.

There is a difference in approach for PC vs Mac. For some reason, I think because of one of the other replies, I got confusededed and thought you’d been developing from a PC. For Mac, you need to look in either the /dev folder or the /Library/extensions folder and find the path for the IO driver. See the LC documentation for ‘serialControlString’ and ‘open driver’. 

My son and I have been working on a physical Train Sim World controller which is basically the whole dashboard from a Class 365. It uses an Arduino board and a digital serial shunt to pick up all the buttons, switches and sliders and control lights and dials. This is then picked up by LiveCode and converted into XML for TSW to read from live and control the Sim and provide feedback for the gauges. 

Sean Cole
Pi Digital Productions Ltd

eMail Ts & Cs


> On 24 Dec 2021, at 20:42, Alex Hughson <eurolinkal at aol.com> wrote:
> 
> Thanks Sean for that help. I’m tangled up in Holiday Domestic Duties at the moment but will give it a try in the new year. Meantime questions rolling around my head; if I’m writing the LC prog on a Mac do I have to designate the (PC) com port in that code, which I’m thinking would mean it couldn’t be tested right there and then on the Mac? Also, I’m toying with the idea of using an Arduino as my I/O device. Does that sound healthy?
> 
> Season’s greeting to all the list. best, Alex
> 
> 
> On December 21, 2021 at 5:37:14 PM, Sean Cole via use-livecode (use-livecode at lists.runrev.com) wrote:
> 
> Hi Alex
> Welcome!
> I've done exactly and very similar to what you are describing about 6yrs
> ago from Mac, PC, Linux, iOS via USB, WiFi and GPRS serial adapters. For
> lighting up miniatures of housing estates and apartment blocks. And then
> for some film miniatures for toy commercials and so on.
> 
> Once you've installed the driver for your adapter on Win10, go to the
> Device Manager, Ports and find out what COM port it's linked to (eg, COM2).
> Now in LiveCode, you don't need to know the driver name to write to. Just
> use the command:
> open driver "COM2:" for write
> This sets the plane for communication. Next, you need to set up the
> settings, eg:
> set the serialControlString to "BAUD=9600 PARITY=N DATA=8 STOP=1"
> These are actually the default settings, so do nothing if these are the
> settings you want.
> Now you just need to know the commands to send.
> https://numato.com/docs/16-channel-usb-relay-module/#the-command-set-20
> write "readall" & return to driver "COM2:"
> read from driver "COM2:" for 4 -- ie, 4 characters
> The read command immediately after the write allows it to accept the
> response from the GPIO, in this example, for 4 characters in length (to
> receive the 4 hex characters like 16AF)
> 
> And that's it pretty much. It's super easy and fun. With Wifi modules you
> can use any device to communicate with them. We used iPad mini's which made
> it super flexible.
> 
> Let us all know if you run into any issues and need help.
> 
> All the best
> 
> Sean Cole
> *Pi Digital Productions Ltd*
> 
>> On Tue, 21 Dec 2021 at 04:33, Alex Hughson via use-livecode <
>> use-livecode at lists.runrev.com> wrote:
>> 
>> Hello all. I am a beginner user of LiveCode. I’ve managed to work my way
>> through a project which I think I can complete. However the project has to
>> be able to communicate with an I/O board (Numato 16 channel USB GPIO Module
>> for example) from a Windows Standalone application. I have not been able to
>> find any guidance or samples for how to do this. This has led me to wonder
>> if it is even possible to creat some kind of serial communication using LC
>> or whether I should start over with a different platform. I am doing the LC
>> work using a Mac. Any help or advice would be much appreciated.
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


More information about the use-livecode mailing list