*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 with a Master's degree in computer science from BZU Multan University. I have written for various industries, mainly home automation, and engineering. I have a clear and simple writing style and am skilled in using infographics and diagrams. I am a great researcher and is able to present information in a well-organized and logical manner.

Follow Us:
LinkedinTwitter
Scroll to Top