1 posts
Posted 29 October 2014 - 03:45 PM
Hello there,
i want a simple program, that outputs text a on a monitor when there is a redstone signal and when i turn the signal off it should output text b on the monitor and otherwise. How do I realise that?
8543 posts
Posted 29 October 2014 - 06:37 PM
Moved to Ask a Pro.
3057 posts
Location
United States of America
Posted 29 October 2014 - 06:47 PM
First, you need to know how to use a monitor.
You will want to wrap it using
peripheral.wrapThe commands for the monitor are listed on the
term apiAs for redstone, here's the
redstone api, which can be accessed both through redstone.* and rs.*
You'll also want to know
while loops, and perhaps the
redstone event.
Edited on 29 October 2014 - 05:48 PM
1852 posts
Location
Sweden
Posted 29 October 2014 - 06:49 PM
Well for starters you should check out the wiki, it has all the information you need for this task.
Have you even tried doing this yourself? Do you have any code to show? If not then I feel like this is kinda a request..
Nonetheless, here's the basic stuff you need to know about
Go and check out the link, I'll give you an example code here on how you can do what ( I think ) you're looking todo
--# Wrap the monitor
local monitor = peripheral.wrap( "back" )
--# Create a loop and draw and check the redstone input
while true do
--# Draw to the monitor
monitor.clear()
monitor.setCursorPos( 1, 1 )
monitor.write( rs.getOutput( "right" ) == true and "ON" or "OFF" )
os.pullEvent( "redstone" )
end
1847 posts
Location
/home/dannysmc95
Posted 30 October 2014 - 04:25 PM
Need anything, message me, will see what I can create for you?