API
From an MDB Perspective, Pi Hat VMC uses the same API as other MDB products. To learn about the MDB API, please head over to API section and start by checking API General page.
In addition to the aforementioned, Pi Hat VMC was enhanced with I/O operation Capabilities, namely activate output and read Input values.
Activate Output

Pin | API Index |
---|---|
14 | Driver High 1 |
20 | Driver High 2 |
15 | Driver High 3 |
21 | Driver High 4 |
22 | Driver Low 1 |
17 | Driver Low 2 |
23 | Driver Low 3 |
18 | Driver Low 4 |
24 | Driver Low 5 |
12 | Input 1 |
6 | Input 2 |
11 | Input 3 |
5 | Input 4 |
O,<OUTPUT_INDEX>,<VALUE>
O,1,1
o,1,1
Manual Read Input
I
The hex value below is given by the active inputs. Each active input will correspond to the input index bit with a value 1 on the hex value given by the "I" command.
I,< Hex value of the active input bits>
I
i,00 #No inputs are active
I
i,03 #Inputs 1 and 2 are active