*Preliminary* SPI on the Pi: Communicating with a SPI 3-axis accelerometer using a Raspberry Pi

Step by step guide on how to setup Raspbian, and communicate with a SPI device using bcm2835 SPI library (NOT bit banged!)
This is still very preliminary… I need to add better pictures of physical hookup, and work through some of the awkward code.

Communicating with a SPI 3-axis accelerometer using a Raspberry Pi

 

Step 1: Starting with a blank SD card, download Raspbian image, and install onto SD card

Visit http://www.raspberrypi.org/downloads for instructions on how to install Raspbian
I downloaded:
Raspbian image, and used
Win32DiskImager to install on SD card
There's also more information at http://elinux.org/RPi_Easy_SD_Card_Setup

Step 2: Connect Raspberry Pi to TV/Monitor, and run through initial setup

(Internet connection not required yet)
Set timezone
enable SSH
Update
Then, Finish.

Terminal code:
reboot

Step 3: Optional: Operate Pi headless

Communicating with a SPI 3-axis accelerometer using a Raspberry Pi

Excellent tutorial at
http://elinux.org/RPi_Remote_Access

I use Putty (Windows) or Terminal (Mac) to connect with SSH

Step 4: Recommended: Update OS

Terminal Code:
sudo apt-get update
sudo apt-get upgrade

Step 5: Optional: Setup IP Address e-mailer

I've set up my Pi to e-mail me it's IP address each time it boots.  This makes my life easier when I need to remote login using SSH.
Excellent tutorial at
http://elinux.org/RPi_Email_IP_On_Boot_Debian

 


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top