Jump to content

Lua External Modules (MQTT)


jgialluca
 Share

Recommended Posts

Is it possible to load external modules such as MQTT?   If so, is there any documentation on how this can be done?  I have a good amount of programming background but haven't done much scripting with Lua until recently.  I've read something regarding Lua Rocks; however, the tool is looking for a lua.exe binary.

Thanks! :)

Link to comment
Share on other sites

Can't use C# at this time. Someone could make bindings and people have I the past but LE doesn't support it so it's hard for those people to keep up with changes and bug fixes for the bindings.

Yiu can use any library you want on the C++ side. You'll have to set them up. I would highly recommend Lua though. It's far more flexible and much easier to deal with than C++.

Link to comment
Share on other sites

Hi Rick

Thanks again for your feedback.. I think I'll need to be dusting off my C++ skills.  Lua would have been much easier.  I have attached a quick drawing detailing the method to my madness.  I am trying to use Leadwerks to do some experimentation with augmented reality.  If something happens in the game world it triggers an event in the physical world.  Example:  if you roll a marble forward in the game, it will move a Sphero on the floor.  Reciprocally, if you can capture an event in the real world (Weather via REST), time of day, or a sensor event off a micro-controller (arduino or esp8266), it will trigger an event in the game.  

Its really for no other reason than to see if I can do it :cool: 

Leadwerks MQTT.jpg

Link to comment
Share on other sites

6 hours ago, Rick said:

I think josh removed require() ability which almost all external modules use. 

require() works just fine as long as lua is not sandboxed. Uncheck this option in the editor's Tools>Options...>General tab.

  • Upvote 1

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...