r/ComputerCraft • u/jdf2 • Jan 07 '21
Script enabling usage of peripherals over wireless modems
https://github.com/jdf221/CC-WirelessPeripheral
Not sure if this is useful for anyone. Wanted to have my reactor control monitor in the base but didn't want to run a long networking cable cause ew.
So just made a copy of the peripheral API and reimplemented it so that it simply sent commands to other computers that were connected via wired modems to the reactors then sent back their replies. Should support everything from the real peripheral api unless I missed something. Even supports wrapping the peripherals.
9
Upvotes
1
u/fatboychummy Jan 07 '21
Ooh, very nice, I can see this being pretty useful.
Protip though:
In newer versions of computercraft, modems can be attached to "block modems", which will give them a name instead of a side. This change will make it compatible with those.
It's also just easier and a lot less code to use
peripheral.findrather than iterating through all possible peripherals.1
u/boxesandcircles Jan 07 '21
This is pretty neat, have u thought about sharing it in the computercraft discord
1
u/48756e746572 Apr 07 '23
Actually, I'm getting a problem now. I have a few peripherals set up for managing my mine colony and am getting an error.
I have an ME bridge from advanced peripherals hooked up and am trying to get the ME bridge to export items to a chest.
The code is like this (excluding setting up wpp)
it returns the error
2
u/LoAndEvolve Oct 14 '23
I know this is old but i'd love a guide to how to use this script for a programming noob ;_; I simply want a monitor away from my computer using wireless modems. the computer would run a script that handles MineColonies stuff and i would just like to see everything on my monitor in my home hehe.. is this possible?
1
u/48756e746572 Apr 07 '23
This is cool as hell! I'm automating a minecolony and this really helps