pulse() public method

The default settings should open an Epson drawer.
public pulse ( integer $pin, integer $on_ms = 120, integer $off_ms = 240 )
$pin integer 0 or 1, for pin 2 or pin 5 kick-out connector respectively.
$on_ms integer pulse ON time, in milliseconds.
$off_ms integer pulse OFF time, in milliseconds.
Ejemplo n.º 1
0
$printer->feed();
/* Tax and total */
$printer->text($tax);
$printer->selectPrintMode(Printer::MODE_DOUBLE_WIDTH);
$printer->text($total);
$printer->selectPrintMode();
/* Footer */
$printer->feed(2);
$printer->setJustification(Printer::JUSTIFY_CENTER);
$printer->text("Thank you for shopping at ExampleMart\n");
$printer->text("For trading hours, please visit example.com\n");
$printer->feed(2);
$printer->text($date . "\n");
/* Cut the receipt and open the cash drawer */
$printer->cut();
$printer->pulse();
$printer->close();
/* A wrapper to do organise item names & prices into columns */
class item
{
    private $name;
    private $price;
    private $dollarSign;
    public function __construct($name = '', $price = '', $dollarSign = false)
    {
        $this->name = $name;
        $this->price = $price;
        $this->dollarSign = $dollarSign;
    }
    public function __toString()
    {