Page 1 of 1

Rs232 Serial Communication

Posted: Tue Feb 07, 2012 11:24 am
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?

Re: Rs232 Serial Communication

Posted: Tue Feb 07, 2012 11:34 am
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

Re: Rs232 Serial Communication

Posted: Tue Feb 07, 2012 11:41 am
by CodeDemon
The device connects through usb, but to the computer it looks and acts like a serial port.

Re: Rs232 Serial Communication

Posted: Tue Feb 07, 2012 12:03 pm
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.

Re: Rs232 Serial Communication

Posted: Tue Feb 07, 2012 12:28 pm
by CodeDemon
I added the dll file to %appdata%\love but it says it cant find it.

Re: Rs232 Serial Communication

Posted: Tue Feb 07, 2012 2:30 pm
by miko
thelinx wrote:I'm not sure if LÖVE 0.7.2 supports loading binary modules.
Works for me (on linux).

Re: Rs232 Serial Communication

Posted: Tue Feb 07, 2012 3:02 pm
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.