Skip to content

Instantly share code, notes, and snippets.

@knmcguire
knmcguire / kitchen_crazyflie_swarm.py
Created June 4, 2021 12:39
kitchen_crazyflie_swarm
# -*- coding: utf-8 -*-
#
# || ____ _ __
# +------+ / __ )(_) /_______________ _____ ___
# | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \
# +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/
# || || /_____/_/\__/\___/_/ \__,_/ /___/\___/
#
# Copyright (C) 2019 Bitcraze AB
#
@knmcguire
knmcguire / Makefile
Created November 20, 2020 11:48
lighthouse_app
APP=1
APP_STACKSIZE=300
CFLAGS += -DDISABLE_LIGHTHOUSE_DRIVER=0
CFLAGS += -DLIGHTHOUSE_FORCE_TYPE=2
PROJ_OBJ += app_lighthouse.o
CRAZYFLIE_BASE=../.. #fill in with your crazyflie base code
include $(CRAZYFLIE_BASE)/Makefile
import logging
import sys
import time
import cflib.crtp
from cflib.crazyflie import Crazyflie
from cflib.crazyflie.syncCrazyflie import SyncCrazyflie
import logging
import sys
import time
import cflib.crtp
from cflib.crazyflie import Crazyflie
from cflib.crazyflie.syncCrazyflie import SyncCrazyflie
URI = 'radio://0/80/2M'
import math
import time
import cflib.crtp
from cflib.crazyflie.swarm import CachedCfFactory
from cflib.crazyflie.swarm import Swarm
# Change uris according to your setup
URI0 = 'radio://0/70/2M/E7E7E7E7E7'
@knmcguire
knmcguire / lighthouse_trace_logo.py
Created March 18, 2019 13:46
Demo to make the crazyflie with the LED ring to fly the logo of Bitcraze
#!/usr/bin/env python3
# Demo to make the crazyflie with the LED ring to fly the logo of bitcraze
import sys
import time
import math
import numpy
import cflib.crtp
from cflib.crazyflie import Crazyflie
@knmcguire
knmcguire / lighthouse_concentric_circles.py
Created March 18, 2019 13:37
Demo that makes the crazyflie with the LED-ring fly 3 concentric circles in the colors: red, blue and green.
#!/usr/bin/env python3
#Demo that makes the crazyflie fly 3 concentric circles in the colors: red, blue and green.
import sys
import time
import math
import numpy
import cflib.crtp