V. High level mode with Python 3 service daemon
Using this mode, the development becomes much easier. The communication with the
board and the peripherals is managed by a small Python 3 application, called
pyraspivend.py. The application is available for download on product’s page.
Commands are not case sensitive. We have used capitalization to facilitate reading.
It is a good idea for your application to retry sending the command few times if you get an
“failed” answer. This answer can be returned in the event of Raspberry PI to RASPIVEND
board communication failure. Also it can be returned if you try to address a not connected
device.
1. Configuring Python 3
The only dependency for this application is pyserial library, version 3.0.1 or higher.
2. MDBBillInit
GUI command
Command
Parameters/Comments
MDBBillInit
[none]
RASPIVEND daemon answer
Answer
Parameters/Comments
{"MDBBillInit":"success"}
or
{"MDBBillInit":"failed"}
This command will perform all initialization tasks for the attached
MDB bill validator. If something goes wrong or the MDB bill
validator is not connected to the board, then the command
returns “failed” message.
3. MDBBillEnable
GUI command
Command
Parameters/Comments
MDBBillEnable
[none]
RASPIVEND daemon answer
Answer
Parameters/Comments
{"MDBBillEnable":"success"}
or
{"MDBBillEnable":"failed"}
This command will activate the attached MDB bill validator. This
command must be preceded by the MDBBillInit command. You
cannot activate a bill validator if this one is not initialized.
© 2016 – AUTOMATROM SRL – www.vendingtools.ro