We are trying to do some off-season experimenting with sensors, namely accelerometers and gyroscopes. However, we are having difficulty figuring out how to program the digital accelerometer in LabView. We have searched for examples and tutorials to no avail. It would be very helpful if someone could either explain how to do this with the SPI Vi’s or include a program, screenshot or link.
I no longer have last year’s examples installed, but I can tell you that there is one for 2015. I suspect that you can get most of the info from the data sheet, but it will certainly give a boost if there is an example. If there is one, it will be in ProgFiles/NationalInst/LabVIEW2013/examples/FRC/SPI.
If you don’t find one and need details, I can screenshot, or perhaps a beta team can. I’m not sure if the beta team agreement details.
If possible, a screenshot would a great, thanks.
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.