Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
NodeJS loopback example for troubleshooting SPI communication on Raspberry Pi GPIO
var rpio = require('rpio');
var rxBuffer = rpio.spiTransfer(new Buffer('HELLOSPI'), 8);
for (var i = 0; i <= 7; i++) {
process.stdout.write(String.fromCharCode(rxBuffer[i]) + (i == 7 ? '\n' : ' '));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.