Serial communication via USB device

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
jeffInt
Posts: 23
Joined: Tue Jun 17, 2008 8:29 pm

Serial communication via USB device

Post by jeffInt » Wed Dec 03, 2008 12:21 am

I have a Matrix orbital LCD module attatched to a USB-I2C translation module. This is plugged into a USB port on my Windows box. I have a piece of driver software for the translation module installed on my box. This driver makes the USB interface look like a regular serial port.

With other demo software I have proved to myself that this setup works.

However, I do not seem to be able to communicate with the LCD using RR.

Here is the code I am using;

open driver "com7:" for update
put the result into field "fldMsg"

#following are dec values for I2C control of Matrix orbital LCD (clear screen)
write numtochar(80) to driver "com7:"
write numtochar(254) to driver "com7:"
write numtochar(88) to driver "com7:"


close driver "com7:"


There is a small led on the translation module that flashes with the demo software but does not with the RR code.

Any ideas?

Jeff
Chat with other RunRev developers, pop over to www.bjoernke.com/runrev/chatrev.php

hamlynart
Posts: 101
Joined: Wed Mar 19, 2008 7:10 pm
Location: Glasgow
Contact:

Post by hamlynart » Thu Dec 04, 2008 10:04 am

Did you ever resolve this? I'm in a similar boat wanting to communicate betreen RunRev and a serial device.

Cheers

Jim H

jeffInt
Posts: 23
Joined: Tue Jun 17, 2008 8:29 pm

Post by jeffInt » Fri Dec 05, 2008 10:33 pm

Hi Jim

Yes I have "solved" this issue. Solved as in still early days with run rev code but at least I have proven that communication is possible using a virtual serial port over a USB cable in Win XP.

If you want more please post a question and I will try and help.

Jeff
Chat with other RunRev developers, pop over to www.bjoernke.com/runrev/chatrev.php

hamlynart
Posts: 101
Joined: Wed Mar 19, 2008 7:10 pm
Location: Glasgow
Contact:

Post by hamlynart » Sat Dec 06, 2008 12:15 pm

That's good news. I'm using Mac OSX but I imagine the RunRev code is very similar (if not the same) for communicating with the Serial Proxy. Where do I look to find out how to script for serial communication with RunRev?

Thanks

Jim H

jeffInt
Posts: 23
Joined: Tue Jun 17, 2008 8:29 pm

Post by jeffInt » Sat Dec 06, 2008 4:49 pm

If you open the Run Rev dictionary and search for com1 or driver a number of procedure calls should be returned.

Jeff
Chat with other RunRev developers, pop over to www.bjoernke.com/runrev/chatrev.php

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9292
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Serial communication via USB device

Post by richmond62 » Sat Feb 24, 2018 9:36 pm

I am the owner of a Valiant Roamer 2

http://www.roamer-educational-robot.com/

So . . . the Roamer has a USB connector (meaning it has a USB port to connect to a PC, and at the other end of
the cable a highly individual connector to connect to the Roamer.

except:

1. How do I determine what driver to open (as there is NO driver as such for the Roamer)?

2. What is the difference between 'open driver' and a USB port?

3. How on earth do I understand what signals to send to the Roamer if I get that far?

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”