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
| byte encodebool(boolean* arr) | |
| { | |
| byte val = 0; | |
| for (int i = 0; i<4; i++) | |
| { | |
| val <<= 1; | |
| if (arr[i]) val |= 1; | |
| } | |
| return val; | |
| } |
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
| boolean dip_switch[4]; | |
| dip_switch[0] = digitalRead(3); | |
| dip_switch[1] = digitalRead(4); | |
| dip_switch[2] = digitalRead(5); | |
| dip_switch[3] = digitalRead(6); |
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 pandas as pd | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| import matplotlib.animation as animation | |
| import sys | |
| import os | |
| # This is version 4 of the program | |
| def create_compass_animation(file_path): |
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 csv | |
| import os | |
| import sys | |
| from xml.etree.ElementTree import Element, SubElement, tostring | |
| from xml.dom.minidom import parseString | |
| from datetime import datetime | |
| # Constants | |
| GROUND_LEVEL_ALTITUDE_YSCN = 70 # Ground level altitude at Camden YSCN in meters |
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
| time (ms),datetime,speed (kn),lat (deg),lon (deg),alt (m),angle (deg),satellites,antenna,fix_quality,fix_quality3d,locus_speed,pressure (kpa),temperature (°C),humidity (%) | |
| 133,2024-05-29T03:06:55.023Z,2.36,-34.0417594910,150.6887817383,56.700,121.250,6,0,1,0,0,101.993,18.63,68.56 | |
| 134,2024-05-29T03:06:56.023Z,2.66,-34.0417671204,150.6887817383,56.900,114.200,6,0,1,0,0,101.991,19.01,68.49 | |
| 135,2024-05-29T03:06:57.023Z,1.62,-34.0417785645,150.6887817383,56.200,139.110,6,0,1,0,0,101.993,19.01,68.62 | |
| 136,2024-05-29T03:06:58.023Z,1.16,-34.0417861938,150.6887664795,56.200,170.020,6,0,1,0,0,101.993,19.01,68.46 | |
| 137,2024-05-29T03:06:59.023Z,1.35,-34.0417938232,150.6887664795,55.600,163.370,6,0,1,0,0,101.990,19.05,68.48 | |
| 138,2024-05-29T03:07:00.023Z,2.04,-34.0418014526,150.6887664795,55.900,115.460,6,0,1,0,0,101.992,19.09,68.52 | |
| 139,2024-05-29T03:07:01.023Z,1.71,-34.0418090820,150.6887664795,56.200,111.680,6,0,1,0,0,101.994,19.09,68.57 | |
| 140,2024-05-29T03:07:02.023Z,1.03,-34.0418128967,150.6887664795,56.700,104.110,6,0,1,0,0, |
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 pandas as pd | |
| import matplotlib.pyplot as plt | |
| import matplotlib.dates as mdates | |
| import sys | |
| def analyze_flight_data(file_path): | |
| # Load the GPS data | |
| gps_data = pd.read_csv(file_path) | |
| gps_data['datetime'] = pd.to_datetime(gps_data['datetime']) |
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
| // Requires Arduino Joystick Library https://github.com/MHeironimus/ArduinoJoystickLibrary | |
| #include <Joystick.h> | |
| const int8_t sw_1 = 18; | |
| const int8_t sw_2 = 4; | |
| const int8_t sw_3 = 6; | |
| //Joystick_ Joystick; | |
| Joystick_ Joystick(JOYSTICK_DEFAULT_REPORT_ID, | |
| JOYSTICK_TYPE_JOYSTICK, 4, 0, |
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 <SPI.h> | |
| #include <Adafruit_GFX.h> | |
| #include <Max72xxPanel.h> | |
| int pinCS = 10; // Attach CS to this pin, DIN to MOSI and CLK to SCK (cf http://arduino.cc/en/Reference/SPI ) | |
| int numberOfHorizontalDisplays = 4; | |
| int numberOfVerticalDisplays = 1; | |
| byte button_1 = 5; | |
| byte button_2 = 4; |
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
| --[[ | |
| LJ - 07.30 - sine_wave_DAC0.lua | |
| This script creates a rudimentary sine wave on DAC0. | |
| Components | |
| ---------- | |
| - LabJack T4 | |
| - Oscilloscope |
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
| --[[ | |
| LJ - 09.50 - blink_LED_FIO5.lua | |
| This script shows how to control an LED with FIO5 with a Lua script. | |
| Components | |
| ---------- | |
| - LabJack T4 | |
| - LED |