![]() |
Here's Some Sensor Test Code for the Gyro & PID, Accelerometer, and Magnetic Encoder
I created some test code for making sure various sensors were working, and understanding how to use the WPILIB PID class(for the gyro). After I finished, I commented them for others to use and expanded upon the comments in the README.md that can be read on github easily.
Let me know if anything is unclear or if there are any questions. Each link links to a git repository on github. On the page is some information about setting up the device for running the code. If you aren't familiar with git, the code can be downloaded as a compressed file(click the zip button). Each repository is a contains a netbeans project for ease of use. Just click open>Open Project... and navigate to the extraced folder to add the project to netbeans. ADXL345 Accelerometer Test Code Am-2067 Gyroscope Test code Am-2067 Gyroscope and PID Example AS5145B Encoder - Incremental Mode Test Code AS5145B Encoder - Absolute Mode Test Code |
Re: Here's Some Sensor Test Code for the Gyro & PID, Accelerometer, and Magnetic Enco
From what I saw, it looks like these basically just log the values. Any reason you use a separate project just for logging a sensor's value instead of just putting it in your normal code?
|
Re: Here's Some Sensor Test Code for the Gyro & PID, Accelerometer, and Magnetic Enco
Quote:
Just using these classes with my actual robot code would have been be next to impossible this year if I didn't write some(very basic) test to code to verify that the device was indeed correctly wired, and to see what the output looked like. |
Re: Here's Some Sensor Test Code for the Gyro & PID, Accelerometer, and Magnetic Enco
Quote:
|
| All times are GMT -5. The time now is 09:59. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi