I have an Arduino uno3 which gets data from a digital caliper and shows the data in serial monitor. Now I should make a connection between this Arduino and my Beaglebone black through SPI to get the data sent from caliper in Beaglebone black. and I don't know what to do and how to create codes related to this purpose.

1 Answer 1


Have a look at the first several links from googling for Arduino and my Beaglebone black through SPI. Here are a few comments on those first few links:

SPI - Beaglebone Black Master Arduino Uno Slave (forum.arduino.cc topic 446924.0) – This page asks your question in more detail, and includes Beaglebone master code and Arduino Slave code. However, the poster makes an egregious error in the Arduino code by saying Serial.println("SPI"); within the SPI interrupt service routine.

Communicate Beaglebone Black and Arduino via SPI (ulasdikme.com) – This page addresses your question in rather more detail, and apparently shows working code. It also explains how to enable SPI in the Beaglebone device tree. Note, this poster too makes an egregious error in the Arduino code by saying Serial.println(c); within the SPI interrupt service routine.

SPI communication: BeagleBone Black (as Master) to 4 Arduinos (as Slaves) (adurthi.com) – This page covers level shifting and device tree setup and provides ok code. It seems to cover BeagleBone concerns nicely, and has ok Arduino code as well.

One or two of the above also make reference to Nick Gammon's excellent SPI pages:

SPI - Serial Peripheral Interface - for Arduino (gammon.com.au forum id=10892) – This page is where you should start if you have questions about how SPI works. After you are familiar with SPI basics, scroll down to the “How to make an SPI slave” heading, and set up the master-slave example with two Arduinos. When you have that working, you can substitute or add a BeagleBone as master. Other code examples further down the page include “How to get a response from a slave”, slave SS pin interrupt examples, SPI via USART, speed settings, SPI on ATtinys, sending data structures, and (under the heading “SPI under IDE 1.6.0 and later”), exegesis of SPI library methods.

Debugging using SPI/I2C and a second processor (gammon.com.au forum id=11329) – This page illustrates master-slave communication between two Arduinos, using one as a slave to forward information sent from a system being debugged. Also illustrates use of I2C for similar purpose. Note, Debugging The Arduino With The SPI Interface Instead Of Serial.println() (utopiamechanicus.com) is a follow-on article, by another author, about this debugging technique.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.