Emlid Navio2 examples are not working

I connect navio2 to my pi and im working on the pi’s OS i cloned Navio2 folder from github. Im trying now to run the examples but i keep getting a lot of error. Are the examples working with anyone?

Hi @fa0348733,

Welcome to our forum!

Can you please run the following command and post the output here?

emlidtool test

This command runs the tests for all Navio2 sensors. Probably, at least one of them fails. Thus it doesn’t allow you to run the examples properly.

I am using Raspian not emlid OS so this command didn’t work.

Ah, I see. Then it explains why it doesn’t work. You can use only the image we provide to run these examples. The standard Raspberry Pi OS doesn’t support communication with Navio2’s sensors.

can i still program Navio2 using python only without ardupilot

Now im working on the emlid OS but when im trying to run the examples i get the following message:

APM is running. Can’t launch the example.

Hi @fa0348733,

The standard Raspberry Pi OS doesn’t know how to communicate with Navio2 sensors so you won’t be able to access most of the board’s functionality.

You need to stop the AuduPilot firmware to run the examples.

How to stop the Ardupilot firmware

You can run the following command first:

sudo emlidtool ardupilot

In the opened window it will ask you if you want to stop ArduPilot which is currently running.

Im trying now to run a code of the Servo but im getting the following message:

Traceback (most recent call last)
File “Servo.py”, line 14, in
pwm.set_period(50)
File “/home/pi/Navio2/Python/navio/pwm.py”, line 53, in set_period
with open(self.channel_path + “period”, “w”) as pwm_period:

Did you run this script using sudo?

no, I tried it now with the sudo, the code is running but the motor is not moving.

How did you connect the motor to the servo rail?

I connected the motors with the ESC, then the ESC is connected the PWM pin(1) of the NAVIO

Oh, I see. This example is designed to control a micro servo motor, not ESC with the motors. This is why it’s not working for your current setup.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.