mid-kid
1 year ago
4 changed files with 19 additions and 13 deletions
@ -0,0 +1,14 @@ |
|||||
|
#!/bin/sh |
||||
|
set -e |
||||
|
dev=/dev/usb/lp0 |
||||
|
|
||||
|
# Initialize printer |
||||
|
printf '\x1B@' > $dev |
||||
|
|
||||
|
# Set print speed |
||||
|
printf '\x1D(K\2\0' > $dev |
||||
|
printf '21' > $dev |
||||
|
|
||||
|
# Set head energizing |
||||
|
printf '\x1D(K\2\0' > $dev |
||||
|
printf 'a4' > $dev # 0-4, or \x80 for automatic, default=0 |
@ -1,4 +1,5 @@ |
|||||
#!/bin/bash |
#!/bin/bash |
||||
|
|
||||
|
./init_printer.sh |
||||
printf '\x1Dk\x05'$1'\0' > /dev/usb/lp0 |
printf '\x1Dk\x05'$1'\0' > /dev/usb/lp0 |
||||
./cut_paper.sh |
./cut_paper.sh |
||||
|
Loading…
Reference in new issue