This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import math | |
| from pymavlink import mavutil | |
| class mission_item: | |
| def __init__(self, l, current, x,y,z): | |
| self.seq = l | |
| self.frame = mavutil.mavlink.MAV_FRAME_GLOBAL_RELATIVE_ALT | |
| self.command = mavutil.mavlink.MAV_CMD_NAV_WAYPOINT | |
| self.current = current |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import serial | |
| import time | |
| import numpy as np | |
| import argparse | |
| parser = argparse.ArgumentParser(description='channel') | |
| parser.add_argument('-r', "--reset", type=int, default=0, help='reset throttle value') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pygame | |
| import serial | |
| import argparse | |
| parser = argparse.ArgumentParser(description='channel') | |
| parser.add_argument('-t', "--throttle", type=int, default=0, help='throttle value') | |
| args = parser.parse_args() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import serial | |
| import time | |
| import numpy as np | |
| stick2 = serial.Serial("COM7", 9600) | |
| stick1 = serial.Serial("COM9", 9600) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import serial | |
| import time | |
| stick1 = serial.Serial("COM7", 9600) | |
| stick2 = serial.Serial("COM9", 9600) | |
| # directions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <HardwareSerial.h> | |
| // Configure DAC pins | |
| const int DAC1_PIN = 25; | |
| const int DAC2_PIN = 26; | |
| // Set voltage range | |
| const float VOLT_RANGE = 3.3; | |
| void setup() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from machine import Pin, ADC, DAC | |
| # set up ADC and DAC pins | |
| dac = DAC(Pin(25)) | |
| # define function to convert input value to voltage | |
| def convert_to_voltage(input_value): | |
| voltage = (input_value / 255) * 3.3 | |
| return voltage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import internetarchive as ia | |
| # Create a session and search for items with CC BY-NC-SA 4.0 license | |
| session = ia.search_items('licenseurl:"http://creativecommons.org/licenses/by-nc-sa/4.0/"') | |
| # Print the number of items found | |
| print(f'Found {session.num_found} items with CC BY-NC-SA 4.0 license.') | |
| # Define fields to be retrieved for each item | |
| fields = ["identifier", "title", "collection", "downloads", "description", "date"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from time import sleep | |
| import os | |
| import subprocess | |
| import socket | |
| from threading import Thread | |
| ffmpegProcessId = 1000000 | |
| controlCenterIPAddress = "192.168.0.158" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| import cv2 | |
| from cv2 import aruco | |
| from time import sleep | |
| import keyPressModule as kp | |
| from djitellopy import tello | |
| import serial | |
| import time |