Raspbery Pi GPIO plugin
#2
Hi, welcome to the forum.
WOW, this is impressive! Good work! Especially on getting an external Lua library to work.

Would it help if we modified Lua's require() function to look for binary modules in the plugin's folder first? That should make distributing the plugin much easier.

The natural idea that comes to mind is - assign an arbitrary block in Minecraft to be output of an IO pin - so that when that block becomes powered, the output pin is turned on.
This could be done by letting the user specify the blocks, then simply remembering them in an array and reading their state in OnWorldTick() - since there are only a small number of outputs, it shouldn't be too performance-crippling to check the few blocks. I'm not sure though if we have any method allowing you to access the redstone-power state of a block. Tigerw should know more.

Podle jmena a komentaru v kodu soudim, ze kolega? Smile

Also, you don't need to require the other files in your plugin, all the Lua files in the plugin folder are loaded by MCS (in alphabetical order, except for Info.lua, which is always loaded last) before the Initialize() function is called.
Reply
Thanks given by:


Messages In This Thread
Raspbery Pi GPIO plugin - by Matouš - 02-13-2014, 08:33 PM
RE: Raspbery Pi GPIO plugin - by xoft - 02-13-2014, 10:06 PM
RE: Raspbery Pi GPIO plugin - by Matouš - 02-13-2014, 10:46 PM
RE: Raspbery Pi GPIO plugin - by xoft - 02-14-2014, 12:00 AM
RE: Raspbery Pi GPIO plugin - by worktycho - 02-14-2014, 02:56 AM
RE: Raspbery Pi GPIO plugin - by bearbin - 02-14-2014, 04:32 AM
RE: Raspbery Pi GPIO plugin - by tigerw - 02-14-2014, 04:55 AM
RE: Raspbery Pi GPIO plugin - by xoft - 02-14-2014, 06:34 AM
RE: Raspbery Pi GPIO plugin - by tigerw - 02-14-2014, 10:13 AM
RE: Raspbery Pi GPIO plugin - by bearbin - 02-15-2014, 03:10 AM
RE: Raspbery Pi GPIO plugin - by worktycho - 02-15-2014, 03:45 AM
RE: Raspbery Pi GPIO plugin - by xoft - 02-15-2014, 06:20 AM
RE: Raspbery Pi GPIO plugin - by tigerw - 02-15-2014, 09:16 AM
RE: Raspbery Pi GPIO plugin - by Matouš - 02-16-2014, 02:13 AM
RE: Raspbery Pi GPIO plugin - by NiLSPACE - 02-16-2014, 02:16 AM
RE: Raspbery Pi GPIO plugin - by bearbin - 02-16-2014, 02:18 AM
RE: Raspbery Pi GPIO plugin - by xoft - 02-16-2014, 02:27 AM
RE: Raspbery Pi GPIO plugin - by xoft - 02-18-2014, 08:14 AM
RE: Raspbery Pi GPIO plugin - by xoft - 03-02-2014, 03:25 AM
RE: Raspbery Pi GPIO plugin - by Matouš - 03-02-2014, 04:14 AM
RE: Raspbery Pi GPIO plugin - by worktycho - 03-02-2014, 05:11 AM
RE: Raspbery Pi GPIO plugin - by xoft - 03-02-2014, 05:19 AM
RE: Raspbery Pi GPIO plugin - by bearbin - 03-02-2014, 05:55 AM
RE: Raspbery Pi GPIO plugin - by xoft - 04-25-2014, 04:13 AM
RE: Raspbery Pi GPIO plugin - by Matouš - 04-25-2014, 04:17 AM
RE: Raspbery Pi GPIO plugin - by xoft - 04-25-2014, 06:47 AM
RE: Raspbery Pi GPIO plugin - by Matouš - 04-25-2014, 07:34 AM
RE: Raspbery Pi GPIO plugin - by tigerw - 04-26-2014, 06:36 AM
RE: Raspbery Pi GPIO plugin - by mieciu0077 - 06-01-2016, 05:51 AM
RE: Raspbery Pi GPIO plugin - by Matouš - 06-01-2016, 06:41 AM



Users browsing this thread: 8 Guest(s)