Skip to content

Instantly share code, notes, and snippets.

use std::collections::HashMap;
#[derive(Debug)]
pub struct Stats {
pub average: f32,
pub min: i32,
pub max: i32,
pub mode: i32,
pub median: f32
}
/*****************************************************************
Control - Analog Joystick Control
This is a basic remote control program for the drone in flight mode
*******************************************************************/
#include <CoDrone.h> // The codrone library that holds all the background files for this
void setup()
{
CoDrone.begin(115200); // sets up the connection to the drone using the bluetooth module at 115200bps (bits per second)
#include <CoDrone.h>
void setup()
{
CoDrone.begin(115200);
CoDrone.AutoConnect(NearbyDrone);
}
#define NOTE_B0 31
#define NOTE_C1 33
#define NOTE_CS1 35
#define NOTE_D1 37
#define NOTE_DS1 39
#define NOTE_E1 41
#define NOTE_F1 44
#define NOTE_FS1 46
#define NOTE_G1 49
#define NOTE_GS1 52
#include <CoDrone.h>
void setup() {
CoDrone.begin(115200);
//byte droneAddress[6] = {0xEF, 0x18, 0xE, 0xD7, 0x93, 0x18};
CoDrone.AutoConnect(NearbyDrone);
CoDrone.go(UP,2,100);
CoDrone.go(FORWARD,1,100);
CoDrone.go(UP,2,100);
@dpurrington
dpurrington / ocarina
Last active August 31, 2018 20:05
Ocarina
#include <CoDrone.h>
int Zelda = 0;
int Saria = 0;
int Malon = 0;
int Time = 0;
int Round = 0;
void setup(){
CoDrone.begin(115200);
}
void loop() {
{
// Use IntelliSense to learn about possible Node.js debug attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
[alias]
find-tag = "!f() { git show-ref --tags -d | grep $1 | cut -d' ' -f2 | cut -d'^' -f1 | cut -d'/' -f3 ; }; f"
# one-line log
ls = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short
#pretty log with files
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
#pretty log with age
ld = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=relative
le = log --oneline --decorate
#show log from a single commit (sha)