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

Printing a Program Result

Started by jewelshisen, 21 December 2012 - 06:56 AM
jewelshisen #1
Posted 21 December 2012 - 07:56 AM
I need some help. Can anybody help me code a turtle so that, at the end of the program, it connects to an overhead printer and prints out a results sheet?
ChunLing #2
Posted 21 December 2012 - 08:26 AM
The trick is to move your turtle to where it can access the printer. Then you just:
if peripheral.getType(side) == "printer" then
	printer = peripheral.wrap(side)
end
(side should be where the printer is)

Then you should be able to use the printer normally.

Really, a better way to do this might be to just have the turtle send a rednet message with your results to a computer that has a printer, and have the computer do the printing.
Edited on 21 December 2012 - 07:32 AM
jewelshisen #3
Posted 21 December 2012 - 08:30 AM
accessing the printer isn't an issue, I just need help with the code to make it actually print the page.
Lyqyd #4
Posted 21 December 2012 - 08:47 AM
Check out the peripheral page on the wiki or take a look in the edit program to see how it prints.
Doyle3694 #5
Posted 21 December 2012 - 12:03 PM
Superlazyness link(Happened to have the page open at my tabs so why not):