You could try:
function SPIreadOneRegister(regAddress, spi){ var d = spi.send([0x0B,regAddress,0x00], D31); return d[2]; }
You're sending 3 bytes so you'll get 3 bytes back - but it's the last one (index 2) that'll contain the data you need.
@Gordon started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
You could try:
You're sending 3 bytes so you'll get 3 bytes back - but it's the last one (index 2) that'll contain the data you need.