
Security News
Rust RFC Proposes a Security Tab on crates.io for RustSec Advisories
Rustâs crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.
tessel-thermalprinter
Advanced tools
Support for the A2 micro panel thermal printer module for Tessel.
This module is based on xseignard's thermalprinter package
npm install tessel-thermalprinter
var tessel = require('tessel');
var thermalprinter = require('tessel-thermalprinter');
var printer = thermalprinter.use(tessel.port['A']);
printer.on('ready', function(){
console.info('Printer ready!');
printer
.center()
.horizontalLine(16)
.printLine("we're printing with")
.inverse(true)
.big(true)
.printLine(' TESSEL! ')
.lineFeed(3)
.print(function(){
console.info('Printer finished!');
process.exit();
});
});
For the Last.fm example you'll need to add a api key. You can get one here on their website.
# printer.setMaxPrintingDots( maxPrintingDotsValue, callback() )
_Set the max printing dots (0-255). Default: 7 (( 7 + 1 ) * 8 = 64dots). Unit: ( n + 1 ) * 8dots
According to section 5.2.9 of the datasheet: "The more max heating dots, the more peak current will cost when printing, the faster printing speed. The max heating dots is 8 * ( n + 1 ).""
# printer.setHeatingTime( heatingTimeValue, callback() )
Set the heating time (3-255). Default: 80 (800”s). Unit: 10”s.
According to section 5.2.9 of the datasheet: "The more heating time, the more density, but the slower printing speed. If heating time is too short, blank page may occur."
# printer.setHeatingInterval( heatingIntervalValue, callback() )
Set the heating interval (0-255). Default: 2 (20”s). Unit: 10”s.
According to section 5.2.9 of the datasheet: "The more heating interval, the more clear, but the slower printing speed."
# printer.setLineSpacing( spacing )
Set the space between each printed line vertically
# printer.reset()
Resets printer
# printer.print( callback() )
Runs commands and prints. Run this last.
# printer.printLine( text )
Write text to printer
# printer.lineFeed( amountOfLines )
Feed blank lines out of the printer specified by argument
# printer.bold( onOff )
Makes text bolder
# printer.big( onOff )
Makes text bigger
# printer.underline( onOff )
Makes text underlined
# printer.small( onOff )
Makes text smaller
# printer.upsideDown( onOff )
Makes text upside down
# printer.inverse( onOff )
Makes text black on white
# printer.left( onOff )
Makes text aligned left
# printer.right( onOff )
Makes text aligned right
# printer.center( onOff )
Makes text aligned center
soooooon
# printer.barcodeTextPosition( positionValue )
Set text position relative to barcode.
Positions are:
0: Not printed
1: Above the barcode
2: Below the barcode
3: Both above and below the barcode
# printer.barcode( Printer.BARCODE_TYPES.type, barcodeData )
Print barcode.
The types you can use are: UPCA, UPCE, EAN13, EAN8, CODE39, I25, CODEBAR, CODE93, CODE128, CODE11, MSI
# printer.indent( amountOfColumns )
Create an indentation for text by an amount of cplumns
# printer.horizontalLine( length )
Draw a horizontal line at a certain length
check the example, will add the rest later
# printer.on( 'ready', callback() )
Emitted upon reset and printing settings on printer.
If you want to set options you can do so like this:
// ...
var printer = thermalprinter.use(tessel.port['A'], {
// baudrate for the printer default: 19200
baudrate: 19200,
/* can be found by doing a print test. hold the button printer while
* powering the printer on and it should spit out some shit at the
* bottom is it should say the baudrate
*/
// Max printing dots (0-255), unit: (n+1)*8 dots, default: 7 ((7+1)*8 = 64 dots)
maxPrintingDots: 7,
/* The more max heating dots, the more peak current will cost when printing,
* the faster printing speed. The max heating dots is 8*(n+1).
*/
// Heating time (3-255), unit: 10”s, default: 80 (800”s)
heatingTime: 80,
/* The more heating time, the more density, but the slower printing speed.
* If heating time is too short, blank page may occur.
*/
// Heating interval (0-255), unit: 10”s, default: 2 (20”s)
heatingInterval: 2,
/* The more heating interval, the more clear, but the slower printing speed.
*/
});
// ...
Buy in US (Adafruit) / UK (Hobbytronics)
Requires 5-9VDC @ 1.5Amp power supply during print
Protocol: TTL Serial, 19200 baud
Mean Cycles Before Failure: 5 million lines
Printing Speed: 50-80mm/s
Resolution: 8 dots/mm, 384 dots/line
Don't have a Tessel? As this uses serial it works with most things:
MIT or Apache 2.0
FAQs
A2 micro panel thermal printer module for Tessel
We found that tessel-thermalprinter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Rustâs crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.

Security News
/Research
Socket found a Rust typosquat (finch-rust) that loads sha-rust to steal credentials, using impersonation and an unpinned dependency to auto-deliver updates.

Research
/Security Fundamentals
A pair of typosquatted Go packages posing as Googleâs UUID library quietly turn helper functions into encrypted exfiltration channels to a paste site, putting developer and CI data at risk.