loading

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

Step 10: Compile and Run ADXL362_RaspPi

Picture of Compile and Run ADXL362_RaspPi
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.
 
julioterra2 years ago
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