Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- set Video Channels of each side
- local frontChannel = 63060
- local backChannel = 19174
- local leftChannel = 105
- local rightChannel = 48046
- local topChannel = 24636
- --- detects if there even is a Monitor attached
- local screen = peripheral.find("warpdriveMonitor")
- if not screen then
- print("No Monitor Connected.")
- end
- if screen.isInterfaced() == false then
- print("No Computer Interface Upgrade Installed.")
- end
- print("WD Monitor Configuration Assistant")
- print("Press W A S D for Sides and Q for Top to Select Camera")
- function freqFront()
- screen.videoChannel(frontChannel)
- end
- function freqBack()
- screen.videoChannel(backChannel)
- end
- function freqLeft()
- screen.videoChannel(leftChannel)
- end
- function freqRight()
- screen.videoChannel(rightChannel)
- end
- function freqTop()
- screen.videoChannel(topChannel)
- end
- while true do
- os.sleep(0.5)
- local event, key = os.pullEvent()
- if event == "key" then
- -- keys are represented by numbers, the number for 'W' is 17
- if key == 17 then
- print("Monitor Connected to Front Camera")
- freqFront()
- -- keys are represented by numbers, the number for 'S' is 31
- elseif key == 31 then
- print("Monitor Connected to Rear Camera")
- freqBack()
- -- keys are represented by numbers, the number for 'A' is 30
- elseif key == 30 then
- print("Monitor Connected to Left Camera")
- freqLeft()
- -- keys are represented by numbers, the number for 'D' is 32
- elseif key == 32 then
- print("Monitor Connected to Right Camera")
- freqRight()
- -- keys are represented by numbers, the number for 'Q' is 16
- elseif key == 16 then
- print("Monitor Connected to Top Camera")
- freqTop()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement