Skip to main content

get_yaw()

Description#

This is a getter function that gets the value of the yaw variable.

Syntax#

Python: get_yaw()
Arduino: getYaw()

Parameters#

None

Returns#

The power of the yaw variable (int)

Example Code#
Python#
#Python code
import CoDrone
drone = CoDrone.CoDrone()
drone.pair()
# Print current yaw with getter function
print(“Current yaw :, drone.get_yaw())
drone.close()
Arduino#
//Arduino code
#include<CoDrone.h> //header
void setup(){
//open serial and connect
CoDrone.begin(115200);
CoDrone.pair(Nearest);
// save current yaw value in variable “current_yaw”
int current_yaw = CoDrone.getYaw();
}
void loop(){
}