Hello, I have built an ROV largely based on http://techmonkeybusiness.com/rov-control-sketches-fourth-edition.html - It uses 2 Arduino nanos to communicate via EasyTransfer.h and currently it receives sensor data and prints it on a LCD.
I am now trying to use the minimosd to show this sensor data on my FPV goggles - I have searched a ton of forums and tried several complicated examples based on ArduPilots from github but I am really struggling to decode Mavlinks protocols to display simple data from my sensors [ IMU (MPU9250), Temperature/Pressure sensor (MS5803), RTC (DS3231) and external PSI/Depth sensor (A6), voltage (A7) ].
Can you please help me understand:
- If it is possible to do this without APM/Pixhawk?
- Is there a simpler way to do this?
- If not, does anyone have some simple Mavlink code to send voltage to minimosd that I could learn from?
Here is some of my existing code:
const int Voltpin = A7;
const float RefVolts = 5.0; // 5-Volt board reference voltage on Nano
const float ResistFactor = 319.68; //Calculated from 1023.0*(R2/(R1 + R2) - where R1 = 2200 ohms and R2 = 1000 ohms for a 15V max voltage.
volts = ((analogRead(Voltpin) / ResistFactor * RefVolts) * 10); //Read the voltage
//from the battery through the voltage divider. Factor of 10 used
//to help achieve an integer with 0.1V accuracy.
txdata.BattVolt = volts; //Send back the onboard battery voltage.
lcd.print("ROV Volts: ");