In LabVIEW, from the Getting Started window.
- Click on "Support" on the left side
- Click on "Find FRC Examples..."
- Open the "Sensors" folder by double-clicking on it
- Open the ADXL345 SPI Accelerometer.lvproj
That's your example code.
To run the example
- Right-click on "RT CompactRIO Target (10.0.0.2) and choose "Properties"
- Change the default IP address to your team IP (10.36.54.2) and save
- Run from ADXL345 SPI Accelerometer.vi or build and run as startup
All the code you'll need to add to your project is under the ADXL345 SPI Driver folder in the example project.