-
-
Notifications
You must be signed in to change notification settings - Fork 3
Scanner
Alessandro Proto edited this page May 20, 2026
·
1 revision
The Scanner is a peripheral capable of reading text and colors from printed paper.
The network name of the Scanner peripheral is scanner, you can wrap it via the peripheral functions like peripheral.wrap or peripheral.find.
-
hasPages(): booleanWhether the Scanner can read the pages of the item. -
getLabel(): stringGet the title of the printed paper. -
getPageCount(): numberGet the number of pages. -
eject(): voidEject the inserted item to the front of the block. -
scan(): tableRead the contents of the printout and returns a list of pages.
The scan() function returns a list of papers, containing two tables: one for text lines and one for colors respectively.
Each table of the text and color is a list of the lines of the page.
The colors are in the paint/blit format, that is, each hexadecimal character defines one of the 16 colors.