-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1d50699
commit ec189cf
Showing
3 changed files
with
98 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
Recibo, the Poem Printer | ||
============================================ | ||
|
||
Build your own | ||
============== | ||
|
||
- Raspberry Pi 3 Model B + 16gb card | ||
- POS-5890C printer | ||
- Sandisk 16gb flash drive | ||
- Zero Delay card + nylon arcade buttons | ||
|
||
The Zero Delay card, connected to the buttons, feeds controller information through USB to the Raspberry Pi. It, running my program, reads the according file and sends its content to the printer. | ||
|
||
Flash drive | ||
----------- | ||
|
||
You must have, inside the flash drive, the following file structure: | ||
|
||
- a ``DO_NOT_DELETE.txt`` empty file | ||
- a ``poem-printer`` folder with this script | ||
- a ``files`` folder with your text/images folders | ||
- The working version has four folders: comics, poems, short-stories and kids. | ||
- In order to add more folders, you need to edit the code in ``__init__.py``. | ||
|
||
|
||
Zero Delay card | ||
--------------- | ||
|
||
The Zero Delay card is self-configurable. The only necessary part is knowing which button triggers each event. | ||
|
||
Sadly, this can only be done by trial-and-error (connect a button, press it, see if anything happens, note it down) or by changing the code in ``__init__.py`` that receives the button inputs (around the end of the file). | ||
|
||
Raspberry Pi | ||
------------ | ||
|
||
It's easier to flash an existing Poem Printer card, but if not found, you need to do the following manually to a fresh Raspbian install. | ||
|
||
Copy the ``flash_drive.sh`` to your Raspbian home folder, then edit ``/etc/rc.local`` file at Raspbian like this: | ||
|
||
:: | ||
|
||
# Mounts the flash drive and copies the files to your Pi | ||
sudo sh /home/flash_drive.sh | ||
# Runs the script | ||
sudo python3 /home/pi/poem-printer/poem-printer/src/__init__.py & | ||
|
||
exit 0 | ||
|
||
- The ``/dev/sda1`` can change, depending on your system. | ||
|
||
The only downside is that it takes a few seconds to boot completely. | ||
|
||
(If you know a way to run the script ONLY after the USB drives were mounted succesfully, please let me know. All my attempts failed) | ||
|
||
to watch rc.local after boot: ``grep rc.local /var/log/syslog`` | ||
|
||
To test without rebooting, run ``sude /etc/rc.local`` on your Pi. If it complains about ``resource busy``, restart your printer. | ||
|
||
There is a ``kill button`` implemented in this version. It's a button that, when clicked, quits the process and allows you to restart it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
Recibo, the Poem Printer | ||
============================================ | ||
|
||
Roadmap | ||
======= | ||
|
||
The software development has the following roadmap: | ||
|
||
Proof of concept | ||
---------------- | ||
|
||
1. [DONE] The printer should succesfully print a accented string (``latin-1``) after a program command. | ||
|
||
Custom text | ||
----------- | ||
|
||
1. [DONE] The program should read from a ``.txt`` file | ||
2. [DONE] The program should format the result from ``read`` accordingly. | ||
3. [DONE] The printer should print succesfully the generated string by the program. | ||
|
||
More folders, more texts | ||
------------------------ | ||
|
||
1. [DONE] The program should read from two folders: ``short-stories`` and ``poems`` | ||
2. [DONE] The program should format each file accordingly. | ||
3. [DONE] The printer should print a random text from a single folder after a command. | ||
4. [DONE] The printer should print a random text from a single folder after a key press. | ||
|
||
Images | ||
------ | ||
|
||
1. [DONE] The program should read a ``bitmap`` image. | ||
2. [DONE] The program should format the image accordingly (Maybe here I'll simplify the process by creating mandatory image pre-formatting rules) | ||
3. [DONE] The program should print the image after a command or key press (as it should be already implemented as seen above) | ||
4. [DONE] The program should read, format and print a random image from the ``images`` folder succesfully |