Skip to content

Instantly share code, notes, and snippets.

View MikahB's full-sized avatar
💭
Ain't no rabbit hole too deep!

Mikah Barnett MikahB

💭
Ain't no rabbit hole too deep!
View GitHub Profile
@MikahB
MikahB / mmb_simplane.py
Last active April 4, 2024 21:22
Very Basic Airplane Simulator
import asyncio
import time
from math import sin, cos, atan2, tan, radians, degrees
import random
from windlock_beta.flight_control.flight_controller import ControlInput
GRAVITY_ACC = 9.80665 # m/s^2
def mph_to_ms(speed_mph):
@MikahB
MikahB / main.cpp
Created December 22, 2022 23:47
Bounce2 / analogWrite Problems on Teensy 4.1
#include <Arduino.h>
#include <Bounce2.h>
#include <EEPROM.h>
// input states
enum inputState{off, low, medium, high, reset};
// input actions
enum inputAction {shortPress, longPress};
@MikahB
MikahB / message_processing.py
Created December 30, 2017 16:47
Example file from alphaMesh project
import json, os, time
from datetime import datetime, timedelta
from alphamesh import device_management, mesh_configuration
from alphamesh.message_publisher import MessagePublisher, OutboundMessage
def handle_message(message, queue, mconfig):
try:
json_msg = json.loads(message)
except Exception as e: