In this lesson, we'll configure the flight controller to set up the camera tilt servo.
After completing this lesson,
you'll be able to map a transmitter input to a flight controller output.
Now that we have our flight controllers set up and we've set up our controller inputs,
we now can take a look at the inputs on the screen.
If we take a look at the input screen,
we're going to go ahead and start to move the throttle
up and notice that the channel value changes.
Now currently again, the arming settings are disarmed which means that we're not
controlling any of the inputs on, in this case, the motors.
Those are the big things that we want to make sure
that we're not accidentally turning on.
But the important thing to note is that,
we're getting throttle input on Channel3.
If I hold this stick to the right,
we're rolling to the right,
rolling to the left.
We can pitch forward and pitch backward.
And we also have control over the yaw by moving this stick left and right.
The next thing that we want to talk about is Accessory0.
So, this is one of the knobs on the controller.
And as I move it to the right,
you can see that the value goes up and as I move it to the left,
the value goes down.
Now in order to map that to something that we want,
we're going to go to the vehicle screen and notice that in here,
we're going to set Accessory0 to Channel5.
We're going to save that.
We're going to go back to the inputs.
So, right now, Accessory0 is set to Channel5,
which means that as I move the dial, that goes up.
So, I'm telling the software,
in this case, when we save it to the flight controller,
that I want that Accessory0 on Channel5 to do something.
The next thing that we want to do is we want to talk about
the ranges that we want for that accessory.
Now I'm going to set the low end to this value to 1,000 and
then I want to set the upper end of this value to be 2,000.
So, this value right here is 2,000 and this is its current position.
So, as we dial this up and down,
we can change the current position,
and this number right here is going to be this red mark,
which is essentially right in the middle.
So, I'm actually going to set this down to 1,300 and that's where
it's going to get to its neutral position or it's neutral state,
and we'll figure out if these numbers are right once we start to control the camera.
Now in order to actually control the camera,
we want to make sure that we go to the output section and it asks if we want to proceed.
We're going to say, No, and we're going to save this.
And it'll save that information to the flight controller.
And then we'll go to the output screen.
So, right now, one through four are controlling each of our motors.
You see that northwest, northeast, southeast, southwest.
So, essentially, one, two,
three and four in terms of our motor numbers.
You'll also notice that,
one through three and number four are set to 490 Hertz,
and number five, seven and eight,
which we don't have seven and eight in terms of our standard PWM pins,
we have it set to 50 hertz.
So, Channel5, our Accessory0,
this is the one that we want to use to control the camera output.
So, we're going to take this slider and we're going to try to move it up,
and notice that nothing changes.
Right now, it's set to 1,000 for min and 1,000 for max.
We're going to set the max value to 1,500 and we're going to save that.
So now, after you save that to your controller,
what you should see is if you turn the dial on your controller,
you can actually move your camera up and down.
So, these values right here,
this 1,500 is going to be the max amount that we're going to tilt down.
If we say change this to 1,700 and we save it,
this means that your camera will be able to tilt further down.
So, as long as you have the available movement to do this,
you can have it point all the way down by setting it to roughly
2,000 and saving that to the flight controller.
And then, you can point the camera almost straight down which allows
you to see quite a bit when you're in a hover.
We also want to make sure that
the most vertical position is the standard straight forward position.
I'm not going to worry about looking up at all in this case.
So, I'm going to save it at 1,200.
And in my specific instance,
1,200 isn't quite vertical or it isn't quite normal with the plane that we're flying in,
so it looks like 1,100 in my case.
It's going to be looking straight forward.
So, now I have a range of values going from 1,100 to
2,000 that lets me look straight forward in the all the way
to the left position on my dial and almost straight
down all the way to the right position.
So, this looks really good and making sure that the camera
again on the input side of things is set up on Channel5,
Accessory0 in our case.
It will be different depending on your controller and your setup.
But these values right here, 1,000-2,000,
this is what we're telling the software is the range of our dial.
So, at the max position,
that value is 2000.
At the minimum position,
that value was 1,000.
And in general, the output section is going to be roughly equal to that.
Now in this case, 1,000 would actually look slightly up.
So, we can go back to the inputs and we can change
this lower end value to 1,100 and save it.
And that's going to again mimic exactly what my input and outputs are going to be.
So, now that means that at full left on the dial,
what I have is a straightforward view.
If I go back and I change my input to, say,
900 and I save it,
what this means is that, again,
my output is dictating what the camera motion is going to be,
and what it's doing is it's actually taking about
the last quarter turn on the dial and the last quarter turn is not doing anything for us.
If we instead set the last quarter turn to 1,100 and save it,
then am more evenly mapped to what my output is.
So, at this point, I have my flight controller configured, my gyro configured,
I have the input configured for my controller,
I know everything that that moves.
When I go to my input screen I can move
the throttle up and I can see that throttle value change.
And I've got Accessory0 map to Channel5,
which is the channel that we're looking at on
the flight controller pin number five and that is now mapped to my camera.
So, now I can tilt my camera, up and down.
Just as a quick note, if you want to use gimbal stabilization,
again you can take a look at Pitch,
Roll or Yaw servos and we can take a look at the output channel and set that to Channel5,
and that will allow us to control the servo that is controlling the tilt on our camera.
So again, there's some basic stabilization settings if
you're using a three-axis gimbal setup,
whether it's with servos or whether using actual brushless gimbal motors,
then you can use the same type of configuration and allow
the camera to tilt and pitch and yaw and do all these different things,
based on the attitude of the entire device, the quadcopter.
Again, while am getting into that we want manual control,
so we're using these inputs and output values,
so that we can manually tilt the camera up and down.
So, at this point, you notice that we have a green check mark next to save.
We can save again if we want to.
We go back to our input section,
go back to arming.
We're going to set it to which ever option you want in terms of arming your vehicle.
A lot of people like to use the Roll to the right,
which means that you'll take the stick that you have set up for rolling the quadcopter
and you'll push it all the way to the right and that'll then arm the motors.
I'm going to use always armed on mine,
because I have my controller setup,
so that one of my accessory toggles will actually turn that
off and not allow me to control anything until I flip that toggle.
So again, there are various ways that you can set yours to be armed,
but at this time,
we can now reassemble the component tray,
so we can get ready to do our first test flight.