MATLAB: Starting and Stopping the PARROT Minidrone

Aerospace BlocksetEmbedded Coderminidronesparrotparrot minidronessimulinkTarget Support Package

After I have successfully generated code from Simulink, how do I start and stop the PARROT Minidrone?

Best Answer

After successful code generation, create a PARROT object using the below command.
>> rs = codertarget.parrot.internal.parrotminidrone
Then, start the drone using the below command.
>> rs.startDroneFlight
By default, all models configured for PARROT Minidrones only run for 20 seconds. In case you wish to stop the drone before this flight time is completed, use the below command.
>> rs.stopDroneFlight