![]() |
ADXL345 SPI Accelerometer
How do you set up the code for the ADXL345 SPI Accelerometer? I opened up the example under the example finder, but I don't know where to put the code or what I need for read, range, etc.
|
Re: ADXL345 SPI Accelerometer
Quote:
You'll have to change the IP address on the Project Explorer to your team's IP address. |
Re: ADXL345 SPI Accelerometer
How do I incorporate this into our team's current code which features drive, camera, joystick, etc.?
|
Re: ADXL345 SPI Accelerometer
Quote:
The Open function produces a Device Reference. You'll need a way to make it available in other VIs; that's what the RefNum Registry Set and Get functions are for. Follow the pattern you see with Joystick and Motor refnums in the code. The SPI Set/Get functions are in the WPI Robotics Library -> Communications subpalette. Things will probably work best if you copy the contents of the ADXL345 SPI Driver folder from the example project into your team's code, but I think you can get away with leaving them where they are as long as you don't make any changes to them. |
Re: ADXL345 SPI Accelerometer
You might also look at Tutorial 7 - Integrating Examples into Robot Code. You can find this on the Tutorials tab of the LabVIEW Getting Started Window. If you already have LabVIEW code open, choose View>>Getting Started Window...
|
Re: ADXL345 SPI Accelerometer
Now, how to debug why there's nothing. No errors, no change in data. From two of the three boards we have (haven't tried the third). Will I need to put a scope on the send and receive lines?
|
Re: ADXL345 SPI Accelerometer
Quote:
Specifically, there is were two updates for LabVIEW. Here's the latest updated. Next, if you haven't, update the utilities and driver station as well. Those are available from the link above as well. To note, you MUST have the newest driver station software installed prior to competition. |
| All times are GMT -5. The time now is 10:47. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi