Command(take off)

hi guys.
I’m building an autonomous drone without a joystick. I can arm the drone but it won’t take off.
How can I issue the take off command without a joystick?

You can connect it to Mission Planner and right click on the map > Takeoff > Set altitude.
Also please remind not having RC as failsafe to control is a bad practice. You should always have a RC as backup control.

Yes, you right. But I want to do it by sending command from arduino. I can send the arm command from my arduino (with mavlink protocol), but the drone does not take off even if the take off command is sent.

Which take off command were you sending? Arming command is different from takeoff command.

I send this command after MAV_CMD_COMPONENT_ARM_DISARM. First, I send MAV_CMD_COMPONENT_ARM_DISARM command, and drone looks like arm in mission planner, then i send MAV_CMD_NAV_TAKEOFF command, and nothings happen.

" [" MAV_CMD_NAV_TAKEOFF is this a typo?

Yes, sorry about that.

Typo in the post or copy/paste form the code?

just typo in the post

Can you share how exactly did you send the command?
You should attach the altitude at the 7th parameter.