Dim spi As JavaObject = jPM.RunMethod("openSpiDevice", Array("SPI0.0")) 'or SPI0.1
'writing:
Dim data() As Byte = Array As Byte(0x0, 0x1, 0x2)
spi.RunMethod("write", Array(data, data.Length))
'reading:
Dim buffer(10) As Byte
spi.RunMethod("read", Array(buffer, buffer.Length))