



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
This document describes the experiments for robotics
Typology: Summaries
1 / 7
This page cannot be seen from the preview
Don't miss anything!
// Do not remove the include below #include "PlutoPilot.h" #include "Estimate.h" #include "Utils.h" //The setup function is called once at PlutoX's hardware startup voidplutoInit () { //Add your hardware initialization code here } //The function is called once before plutoLoop() when you activate developer mode voidonLoopStart () { //Do your one time stuff here LED.flightStatus( DEACTIVATE ); } //The loop function is called in an endless loop voidplutoLoop () { //Add your repeated code here if (Velocity.get( Z ) > 0) /If the drone is moving upwards (Velocity in the Z axis will be positive)/ { LED.set( RED , ON ); LED.set( GREEN , OFF ); } else /If the drone is moving downwards/ { LED.set( RED , OFF ); LED.set( GREEN , ON ); }
Monitor.println("Velocity Z: ", Velocity.get( Z )); Graph.red(Velocity.get( Z ), 1); } //The function is called once after plutoLoop() when you deactivate developer mode voidonLoopFinish () { //Do your cleanup stuff here LED.flightStatus( ACTIVATE ); }