So this accelerometer the ADXL345_SPI is what hinging on our gameplay this year. We have it wired but There is no known code i could find to port the accelerometer but everything other than the porting works. I have 8 days to get this working or a large portion of our gameplay will be lost. :deadhorse:
What do you mean by port? Is there any reason you HAVE to get it working with SPI? If you can’t get it working with SPI, why not try I2C?
I’ve seen very few teams use a cheap accelerometer for anything useful, let alone building their entire strategy around it. Perhaps if you describe what you want to do with an accelerometer, we could describe a more practical solution.
Well SPI wiring seems more reliable due to the several complaints with the I2C ports, we figured out the code for the most part and are trying to get the accelerometer to give off values but only 0’s. We are trying to see if its wirirng but for the most part we are trying to read a distance value and using the gyro or accelerometer for directional distance. Any ideas on sensors, we are using a encoder but wheel slip makes it severly in accurate especcially with the Mechanum.
Trying to double integrate acceleration to get position will be far more inaccurate then wheel encoders on mecanums.
I would recommend putting encoders on two unpowered omniwheels at a 90 degree angle to each other. Then put the omniwheels on a suspension so that they are always touching the ground. When we did something like this in the past, we used Vex omni wheels