This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Devzzz's profile picture

Item frame detection

Started by Devzzz, 31 May 2014 - 09:58 PM
Devzzz #1
Posted 31 May 2014 - 11:58 PM
Hi, i'm pretty new to computercraft, basically I'm wanting to place an item in an itemframe next to the computer, and if possible have the computer detect what's inside of the frame and display its name on a screen.

How would I go about doing this, if its possible at all.

Thanks.
sk8mn #2
Posted 01 June 2014 - 01:10 AM
I'm new too and I'm not sure if this is possible but I defiantly think it should be. This could be very hady say for a secret door where you had to place a specific item in the tram which sends a rednet signal to open the door
BlockSmith #3
Posted 01 June 2014 - 01:29 AM
Computers do NOT have detect or compare functions. Those are exclusive to turtles only. The issue is that an item frame is it's own item which stores internal items. It doesn't sound like a turtle would outright be able to figure out what the item is due to the turtle requiring something for it to compare the item to in its inventory. It does not check via item ID. I don't think open peripherals mod would help either, though, it's in the same ballpark since it allows you to look through chests and whatnot.
Edited on 31 May 2014 - 11:33 PM
Bomb Bloke #4
Posted 01 June 2014 - 03:42 AM
Vanillia ComputerCraft does not - as opposed to "cannot", as it's an intentional design choice - let you do this sort of thing.

OpenPeripheral can do this sort of thing, but I don't think it'll let you read item frames specifically. Still, if you've got it installed, take a read through this tutorial then a look at this thread and apply that knowledge to a chest or something.