I am very new to drone programming but here`s what I was trying to do
- Connected Battery to Power Distribution board which connect to all 4 servo rails
- Connected Raspberry PI to power ( seperate source )
- Navio2 is powered through Raspberry Pi
So “sudo python LED.py” works fine
The GPS ones also work fine once I connect the GPS thing on top
however “sudo python Servo.py” does not work. I am expecting that “Servo.py” will make one of the motor ( connected to pin 1 or pin 2 on Navio2) will start rotating .
Can somebody please help me ?
This example is supposed to control micro servo motor.
If you want make it work with your ESC + Motor pairs, you should change the code as following:
PWM_OUTPUT = 0
SERVO_MIN = 1.250 #ms
ESC_INIT = 1.100 #ms
with navio.pwm.PWM(PWM_OUTPUT) as pwm:
# initialize ESC: set initial duty_cicle for 3 sec
for i in range(30):
Thank you very much for reply. Now since you are here can I ask another question. When I do fresh install of Raspberry pi with Stretch (https://docs.emlid.com/navio2/common/ardupilot/configuring-raspberry-pi/) after that the first thing I try to do is following :
sudo raspi-config --expand-rootfs
However the process exit with error “Device is mounted” etc. It seems like some process (navio) is running in background because I did not initiate any process.
I google this issue and try to partition manually as well (using fdisk) however same error. Do you know by any chance what could be causing it ?
Thanks in advance
the error seems weird.
But it is a RaspberryPi problem most likely. Cant imagine running processes in the background to be a problem.
But if you think that is the problem: in the navio documentation it is stated that you can start and stop ardupilot with systemctl.
sudo systemctl stop arducopter.service for example. You should take a look into the docs.
Well I didn`t even started any service yet but ya its weird I am only one experiencing. Thanks for replying anyways.
This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.