Question: I was recently playing with friends and noticed they had a contraption which would activate a redstone signal when they turned the item frame a certain way. How do you make a item frame turn activate a redstone signal?

Answer: 
Item frame rotation based output. This is not my design. 

The item frame does not rotate, an item in the frame does. Some items have to be rotated fully twice(example: maps) in order to output full signal. If using more then one of these devices to form a combination lock, those double rotation items would make it very difficult to unlock. 

It is a simple device that uses a comparator to read the signal level of the item frame. If the signal level is too low or high (item rotated improperly) it will not output. It does this based on the length of the redstone dust after the comparator. The easiest way to use the rotation point you want is to rotate the item to the position you want. Continue to run redstone dust after the comparator until you no longer see the dust has signal. Place a torch on the side of the last block with signal. Leave one redstone dust after that block that feeds into a repeater. 

In this example a signal of 4 or the arrow pointed down will activate the redstone dust at the very end of the line. In the picture, the lower image is the device sending out a signal. 

[![Frame Lock](https://i.stack.imgur.com/PHnnC.jpg)](https://i.stack.imgur.com/PHnnC.jpg)

If you are interested in how it works, the comparator outputs the signal. If the signal is to low, the first torch outputs high(is lit) and this causes the not gate(second torch) to output low(off). If the signal is correct, the first torch turns off, the second torch turns on. If signal is too high, the repeater outputs high which causes the second torch to turn off. 

Edit: I located the video I originally saw this on. It's by SethBling.
Comparators can be used to detect a signal from a block (chest, item frame, lecture, etc.). Used to make locks, coders, selecters, I'm making up the names. There are many things to do with it. By placing it behind an item frame it will detect a signal when an item is in said item frame.