jgialluca Posted July 14, 2017 Share Posted July 14, 2017 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! Quote Link to comment Share on other sites More sharing options...
Rick Posted July 14, 2017 Share Posted July 14, 2017 I haven't been able to. I think josh removed require() ability which almost all external modules use. I've used some Lua libraries but I've had to modify them which is a pain but doable. Quote Link to comment Share on other sites More sharing options...
jgialluca Posted July 14, 2017 Author Share Posted July 14, 2017 Thanks Rick - do you know if its possible using C++ (I would think thats not too far out).. Its been quite a while since I've coded in C++.. Also, do you know if you can leverage C# code? Thanks again for the quick reply J Quote Link to comment Share on other sites More sharing options...
Rick Posted July 14, 2017 Share Posted July 14, 2017 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++. Quote Link to comment Share on other sites More sharing options...
jgialluca Posted July 14, 2017 Author Share Posted July 14, 2017 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 Quote Link to comment Share on other sites More sharing options...
Rick Posted July 14, 2017 Share Posted July 14, 2017 Yeah, you'd for sure want C++ for that Quote Link to comment Share on other sites More sharing options...
macklebee Posted July 14, 2017 Share Posted July 14, 2017 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. 1 Quote 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 More sharing options...
Recommended Posts
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.