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

Step 10: Compile and Run ADXL362_RaspPi

Compile and run.jpg
terminal code:
gcc -o ADXL362_RaspPi -I ../bcm2835-1.5/src ../bcm2835.c ADXL_RaspPi.c
sudo ./ADXL362_RaspPi

Which I combines into a script called compileADXL362.
 
Remove these adsRemove these ads by Signing Up
julioterra says: Jan 21, 2013. 12:43 PM
I had to update the following command in order to get this tutorial to work:
(1) updated inputs (denoted by -I in command)
(2) updated the path from ../bcm2835.c to ../bcm2835-1.5/src/bcm2835.c
(3) updated file name from ADXL_RaspPi.c to ADXL362_RaspPi.c

gcc -o ADXL362_RaspPi -I ../bcm2835-1.5/src ../bcm2835.c ADXL_RaspPi.c


Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!