I’m pretty new to this platform. I’m using an APM 2.6 variant with Atmega.
Could someone advise how I can achieve the following ?
I need to send raw sensor data at a certain frequency (gyro , acc , barometer and GPS) from the APM out through SPI or Uart or whatever to my main control unit .
I installed the modified arduino IDE and am planning to modify the code to add the specific user functions.
Looking through the code I see here: http://dev.ardupilot.com/wiki/code-overview-scheduling-your-new-code-to-run-intermittently/ that I can do this by putting the code in the userloops or in the task scheduler.
My first question is : How do I access the sensor data? Is the latest sensor data stored statically somewhere in the memory into which I can read out and grab? Or will I need to call the sensor and request the data?
My second question is: How do I use the SPI or UART without risk of screwing up the rest of the system? (is that possible? ) Will I need to import a library and just use a send function to send the data?
My guess is that I’ll put the IMU , compass and barometer data out on the 50 Hz loop and the GPS on the 10Hz loop.
I’ve opened the sensor libraries but there are 30 files in each library and I have no idea where to start and what to use . The whole thing looks like a mess to me so I would appreciate some help here. Please don’t redirect me to yet another wall of text.