2.0 KiB
#MDB2Pi HAT
The MDB2Pi HAT can serve as a MDB master or as a peripheral MDB Device for Vending Machines (VMC). It takes care of the MDB specific 9-bit format, electrical and timing constraints. It forwards the MDB payload to the Raspberry Pi UART using a simple serial protocol. The MDB2Pi HAT is powered from the MDB bus (10...42V regulated or unregulated supply) and backpowers the Raspberry Pi with up to 2.5A@5V. Thus no separate power supply is required for the pi.
##Configuration Enable UART and HAT detection by adding the following lines to /boot/config.txt:
enable_uart=1
dtparam=i2c_vc=on
disable serial console output:
sudo nano /boot/cmdline.txt
--> remove the "console=..." parameter
##MDB Master and Cashless Device Demo: Install mono runtime:
sudo apt-get install mono-runtime
Get the Demo code:
wget https://secure.abrantix.com/downloads/MDBConverter/MDBConverter.zip
unzip MDBConverter.zip
How to run the Master Demo:
cd MDBConverter
mono MDBMasterSimulatorConsole.exe /dev/serial0 115200
-> Please make sure to set the DIP Switch to ON-OFF-OFF-ON-ON
How to run the Cashless Device Demo:
cd MDBConverter
mono MDBCashlessDeviceSimulatorConsole.exe /dev/serial0 115200
-> Please make sure to set the DIP Switch to OFF-ON-ON-OFF-OFF
Hint: On newer raspbian releases, the serial port is available as /dev/serial0 - older releases may use dev/ttyAMA0.