Rs232 Serial Communication

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
CodeDemon
Prole
Posts: 8
Joined: Tue Nov 22, 2011 4:09 pm
Location: UK

Rs232 Serial Communication

Post by CodeDemon »

I have recently come up with a very crazy idea. I would like Love to be able to read and write to an rs232 serial port. I have found a library for LuaForWindows that allows serial communication, but I have been unable to get Love to load it. Is there any possible way of doing what I want or is it beyond what Love is capable of?
coffee
Party member
Posts: 1206
Joined: Wed Nov 02, 2011 9:07 pm

Re: Rs232 Serial Communication

Post by coffee »

CodeDemon wrote:I have recently come up with a very crazy idea. I would like Love to be able to read and write to an rs232 serial port. I have found a library for LuaForWindows that allows serial communication, but I have been unable to get Love to load it. Is there any possible way of doing what I want or is it beyond what Love is capable of?
Lol, very crazy idea! Didn't that came even disabled in new pc bios? :D
CodeDemon
Prole
Posts: 8
Joined: Tue Nov 22, 2011 4:09 pm
Location: UK

Re: Rs232 Serial Communication

Post by CodeDemon »

The device connects through usb, but to the computer it looks and acts like a serial port.
User avatar
thelinx
The Strongest
Posts: 857
Joined: Fri Sep 26, 2008 3:56 pm
Location: Sweden

Re: Rs232 Serial Communication

Post by thelinx »

I'm not sure if LÖVE 0.7.2 supports loading binary modules.

LÖVE 0.8.0 can load binary modules that are placed in the global LÖVE save directory (iirc).
Download a recent beta build from https://love2d.org/builds/, then put the library dll in %appdata%/love and try requiring it.
CodeDemon
Prole
Posts: 8
Joined: Tue Nov 22, 2011 4:09 pm
Location: UK

Re: Rs232 Serial Communication

Post by CodeDemon »

I added the dll file to %appdata%\love but it says it cant find it.
User avatar
miko
Party member
Posts: 410
Joined: Fri Nov 26, 2010 2:25 pm
Location: PL

Re: Rs232 Serial Communication

Post by miko »

thelinx wrote:I'm not sure if LÖVE 0.7.2 supports loading binary modules.
Works for me (on linux).
My lovely code lives at GitHub: http://github.com/miko/Love2d-samples
utunnels
Citizen
Posts: 75
Joined: Fri Jan 06, 2012 5:20 pm

Re: Rs232 Serial Communication

Post by utunnels »

You can put the dll with love.exe on windows, works both 0.7.2 and 0.8.0

Code: Select all

require("luars232")
In 0.7.2, it doesn't work if you place the dll in %appdata%\love, but in 0.8.0 it works.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 9 guests