Jump to content




Printing a Program Result

turtle peripheral

  • You cannot reply to this topic
4 replies to this topic

#1 jewelshisen

  • Members
  • 164 posts

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?

#2 ChunLing

  • Members
  • 2,027 posts

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 by ChunLing, 21 December 2012 - 08:32 AM.


#3 jewelshisen

  • Members
  • 164 posts

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.

#4 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

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.

#5 Doyle3694

  • Members
  • 815 posts

Posted 21 December 2012 - 12:03 PM

Superlazyness link(Happened to have the page open at my tabs so why not):





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users