First off, I apologize if this has already been done and I failed to find it.
I have a few quads with MWC 2.1 on ATMega boards (like the Crius AIOP) and I would like to write some code (if it does't already exist) to send status messages via a free serial port (serial 1 or 3 in my case) to an Arduino nano that I will use as a lighting driver for addressable RGB LED strips on my quads.
My first thought was to go throughout the entire MWC code base and find certain events like "arming" and then set a free pin on the AIOP to high or something like that; however, the more I think of it, this is a very clumsy approach. So now I am wondering if there is a single class in the MWC code for monitoring events and if we can send bytes containing info about those events to an available serial port if the config.h is set to do so.
The types of status messages and information that I think would be useful include the following:
- Arming status
- Aux mode status (level, heading hold, position hold, return to home, etc)
- Sensor readings (gyro, acc, magnetometer, barometer, etc)
- Rx readings (Throttle position, Aileron pos, Elevator pos, etc)
My lighting project is pretty "processor intensive" given the special lighting patterns I am creating and I don't think it would be smart or even possible to run this code on the same Arduino/flight controller which is why I will run the lighting from a separate nano.
My overall thinking is that if this information was made available on a serial port, then people could create all sorts of interesting additions and mash ups without interfering with the code that actually running on the flight controller.
Thoughts?
Thanks!
Matt