{"id":20989924,"url":"https://github.com/robtillaart/parallelprinter","last_synced_at":"2025-05-14T18:32:21.532Z","repository":{"id":45297352,"uuid":"274697841","full_name":"RobTillaart/ParallelPrinter","owner":"RobTillaart","description":"Arduino library that implements a parallel printer - print interface","archived":false,"fork":false,"pushed_at":"2024-04-13T09:10:42.000Z","size":45,"stargazers_count":14,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-07T18:26:54.908Z","etag":null,"topics":["arduino","parallel","printer"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RobTillaart.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":"RobTillaart","custom":"https://www.paypal.me/robtillaart"}},"created_at":"2020-06-24T15:02:25.000Z","updated_at":"2024-03-26T03:37:47.000Z","dependencies_parsed_at":"2024-04-13T10:26:47.335Z","dependency_job_id":"5f333161-9ba7-4572-9876-088bbbf7b2a7","html_url":"https://github.com/RobTillaart/ParallelPrinter","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobTillaart%2FParallelPrinter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobTillaart%2FParallelPrinter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobTillaart%2FParallelPrinter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobTillaart%2FParallelPrinter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RobTillaart","download_url":"https://codeload.github.com/RobTillaart/ParallelPrinter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225305798,"owners_count":17453452,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino","parallel","printer"],"created_at":"2024-11-19T06:26:44.410Z","updated_at":"2024-11-19T06:26:44.986Z","avatar_url":"https://github.com/RobTillaart.png","language":"C++","funding_links":["https://github.com/sponsors/RobTillaart","https://www.paypal.me/robtillaart"],"categories":[],"sub_categories":[],"readme":"\n[![Arduino CI](https://github.com/RobTillaart/ParallelPrinter/workflows/Arduino%20CI/badge.svg)](https://github.com/marketplace/actions/arduino_ci)\n[![Arduino-lint](https://github.com/RobTillaart/ParallelPrinter/actions/workflows/arduino-lint.yml/badge.svg)](https://github.com/RobTillaart/ParallelPrinter/actions/workflows/arduino-lint.yml)\n[![JSON check](https://github.com/RobTillaart/ParallelPrinter/actions/workflows/jsoncheck.yml/badge.svg)](https://github.com/RobTillaart/ParallelPrinter/actions/workflows/jsoncheck.yml)\n[![GitHub issues](https://img.shields.io/github/issues/RobTillaart/ParallelPrinter.svg)](https://github.com/RobTillaart/ParallelPrinter/issues)\n\n[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/RobTillaart/ParallelPrinter/blob/master/LICENSE)\n[![GitHub release](https://img.shields.io/github/release/RobTillaart/ParallelPrinter.svg?maxAge=3600)](https://github.com/RobTillaart/ParallelPrinter/releases)\n[![PlatformIO Registry](https://badges.registry.platformio.org/packages/robtillaart/library/ParallelPrinter.svg)](https://registry.platformio.org/libraries/robtillaart/ParallelPrinter)\n\n\n# ParallelPrinter\n\nArduino library that implements a parallel printer (driver) - implements the PRINT interface.\n\n\n## Description\n\nThis library defines a parallel printer object.\n\nIt implements the **Print interface** to be able to print all data types \nusing **write()**, **print()** and **println()**.\nThe printer writes every byte over 8 parallel lines including a **STROBE** (clock) pulse,\nwhile waiting for the connected printer not to be **BUSY** or **OUT OF PAPER** (OOP).\n\nThis library is meant to be a starting point to make a \"printer driver\" for a \nspecific parallel printer. These can often be bought in 2nd hand stores or so.\n\nHave fun!\n\n**Note:** This lib is a extended redo of the ParPrinter class.\n\n\n## Interface\n\n```cpp\n#include \"ParallelPrinter.h\"\n```\n\n### Constructor\n\n- **ParallelPrinter()** uses default pins (13, 2, 12, \\[3,4,5,6,7,8,9,10\\])\n- **ParallelPrinter(uint8_t strobe, uint8_t busy, uint8_t oop, uint8_t \\*arr)** \ndefine 3 control pins + 8 data pins (= arr\\[8\\]).\n- **void begin(uint8_t lineLength, uint8_t pageLength)** set line and page length parameters\n\n\n### Print interface\n\n- **size_t write(uint8_t c)** send a single byte to printer, implements Print interface. \nTherefore all **print()** and **println()** functions will work.\n- **void formfeed()** to eject current page or forced go to the next page.\n- **void linefeed()** send a linefeed. \nThe number of actual lines is set by **setLineFeed()**\n\n\n### Configuration\n\nThese settings are pretty straightforward.\n\n- **void setLineLength(uint8_t lineLength)** idem\n- **uint8_t getLineLength()** returns the current line length. \n- **void setPageLength(uint8_t pageLength)** idem\n- **uint8_t getPageLength()** returns the current page length.\n- **uint8_t getLineNumber()** returns current line number.\n- **uint8_t getPageNumber()** returns current page number.\n- **uint8_t getPosition()** returns the position on a line.\n- **uint8_t setTabSize(uint8_t tabsize)** tabs are replaced by spaces. n can be 0 or any size!\n- **uint8_t getTabSize()** returns tabSize set\n- **void setLineFeed(uint8_t lineFeeds)** lineFeeds = 1,2,3  1 = default. \n- **uint8_t getLineFeed()** returns lineFeeds set\n- **void printLineNr(bool b)** can be set to true, false.\n\n\n### Expert mode\n\n- **bool isOutOfPaper()** to check paper tray before printing starts.\n- **void setStrobeDelay(uint16_t n = 2000)** allows tuning of performance. \nMake the strobe pulse shorter == faster printing (printer dependant).\nDefault value = 2000. Time in microseconds.\n- **uint16_t getStrobeDelay()** returns value set.\n\n**Note** mechanical printers e.g. dot matrix, really do need a way to stop receiving \ndata as they do not have large buffers.  (==\u003e BUSY line)\n\n\n## See also\n\nhttps://en.wikipedia.org/wiki/Parallel_port#Centronics\n\n\n## Operation\n\nSee examples.\n\n\n## Future\n\n#### Must\n\n- update documentation\n\n#### Should\n\n- extend unit tests?\n- test more.\n- extend simulator sketch.\n  - Make a front end of a parallel printer, \n  - Accepts the clocked bytes and print them e.g. over serial.\n\n#### Could\n\n- derive e.g. an HP or an EPSON printer from this class.\n  - special modes e.g. bold italic underline.\n- **write(uint8_t \\* buf, uint8_t length)** should be added\n  - might not really add to performance..\n- fix blocking TODO in sendByte\n\n#### Wont\n\n\n## Support\n\nIf you appreciate my libraries, you can support the development and maintenance.\nImprove the quality of the libraries by providing issues and Pull Requests, or\ndonate through PayPal or GitHub sponsors.\n\nThank you,\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobtillaart%2Fparallelprinter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobtillaart%2Fparallelprinter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobtillaart%2Fparallelprinter/lists"}