Hello,
I'm trying to use the following library PixhawkArduinoMAVLink.h and I've added the library via the UI Sketch > Include Library > Add .ZIP Library. I can see that is has successfully been installed.
However when running the example code that it comes with, it says it cannot find the library reference. I can also see that the library is in my documents folder as it should be.
I have a Nano board. Any help would be much appreciated.
// Example Code to read acceleration data from pixhawk
// Check HardwareSerial connection for your Arduino board and connect them according to the connection shown in guide.md
#include <PixhawkArduinoMAVLink.h>
#include <HardwareSerial.h>
HardwareSerial &hs = Serial1;
PixhawkArduinoMAVLink mav(hs);
void setup(){
Serial.begin(57600);
while(!mav.begin()){
Serial.println("Not Connected!");
delay(1000);
}
mav.Stream();
delay(2000);
}
void loop(){
float xacc, yacc, zacc;
mav.ReadAcceleration(&xacc, &yacc, &zacc);
Serial.print("X: "); Serial.print(xacc);
Serial.print(" Y: "); Serial.print(yacc);
Serial.print(" Z: "); Serial.println(zacc);
delay(100);
}
accel:4:10: fatal error: PixhawkArduinoMAVLink.h: No such file or directory
#include "PixhawkArduinoMAVLink.h"
^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
exit status 1
PixhawkArduinoMAVLink.h: No such file or directory