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

help with monitors

Started by Mitch, 09 February 2013 - 04:35 AM
Mitch #1
Posted 09 February 2013 - 05:35 AM
help with monitors-title qestion- is there a way for the computer to detect a rs input and then print something and a monitor then sleep(6) then clear the monitor?
theoriginalbit #2
Posted 09 February 2013 - 05:49 AM
Of course there is. :)/>/>

Take a look on the wiki at the OS API, more specifically the os.pullEvent and the "redstone" event. Then take a look at the redstone (rs) API and the peripherals API for monitor printing :)/>/>

Sorry cant give links and examples and such, on my phone
Cranium #3
Posted 09 February 2013 - 05:53 AM
Example:

if rs.getInput(<side>) then --detect the incoming redstone input on <side>
    local mon = peripheral.wrap(<monSide>) --connect to the monitor on <monSide>
    mon.write("Redstone input received!") --write to the monitor
end
Note: <side> and <monSide> must be passed as strings(in quotations)