Operate a Coin Acceptor

The initialization sequence as defined per the MDB Specification is as follows:

Coin Acceptor Initialization Sequence
Copy

Now, below, there is a python program that does this sequence programatically.

Some remarks:

  • This program follows the advised sequence described in Section 5 of the MDB Specification to Initialize a Coin Acceptor.
  • The Tube status is always empty
  • The program is doing nothing with Coin Inserted events
  • The VMC is not enabling any of the Expansion Features that are allowed for level 3 Coin Acceptors.
  • If the coin acceptor sends an incorrect message, the sequence is not reinitialized (this is something that must be done if the program is to be used in a real VMC)
  • Code is not optimized (e.g. Readline must be called after write2Serial, so this could be put in a function)
  • The goal of this example is to demonstrate and keep it simple, this is not suitable for "Real" VMCs. However, it can serve as a starting point.
Python
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard