Buttoneer

Printer testpage buttonificator

A complex for simplifying printer testpage printing procedure

User experience specification

User (operator/printer cartridge serviceman) interacts with the system via dedicated buttons. By pressing a button a testpage print task is sent to the corresponding printer.

Buttons links are set up in the config file on the computer. Number of buttons is six.

* In case of errors a message is displayed on the computer screen and LED is flashed on the microcontroller polling the buttons.

* In case of crash the program is relaunched automatically

Solution contents

The buttonificator consists of

  1. Computer with all printers attached running Linux-based OS

  2. Arduino-based button poller board

  3. 6 pressure-sensitive push-buttons

  4. Program that runs on the computer

  5. Arduino program

Solution architecture

Arduino board is polling buttons in a loop and reporting its state to USB-serial:

state code
Depressed 0
Button X pressed X
Several buttons pressed -1
Error state detected Error code

Code contains button debouncing algorithm.

Acknowledgement reply from computer of 1 is expected to every positive state code sent.

* Acknowledgement or lack thereof will be signalled by a speaker on the board

Error codes are reset by manual reboot only.

On the computer the poller code is launched manually by operator. The code shuffles through available serial ports until the one reporting ‘0’ is found.

Upon receiving positive state code the computer code will launch print command to a printer according to the corresponance table provided in the config file.

Config file has the following structure


p1 = xxx
p2 = yyy
...
pN = NNN

Where xxx/yyy/NNN are the names of printers according to the lpr -p command.

Computer program will call “lpr” command and utilise CUPS printer subsystem.

* Upon every print call symbol ‘1’ is being appended to the ‘~/.local/buttoneer.log’ file

License

The code is provided under MIT license

Links, references

* Optional tasks