Skip to content

Instantly share code, notes, and snippets.

@ZachDaChampion
ZachDaChampion / fire_led.yaml
Created April 20, 2025 15:58
Single-LED Fire Effect (ESPHome)
# Parameters for fire simulation
globals:
- id: red_base_frequency
type: float
initial_value: '5.0' # Low frequency pulse for main red thrust
- id: red_mid_frequency
type: float
initial_value: '15.0' # High frequency flicker for red
- id: red_base_intensity
type: float
@ZachDaChampion
ZachDaChampion / .gitignore
Last active January 11, 2020 03:29
Trapezoidal Profile Generator
.vscode/
@ZachDaChampion
ZachDaChampion / radius_calc.py
Created May 20, 2019 13:47
Calculate the radius and center of an arc given start heading, end heading, start location, and end location
# calculate the radius of an arc given starting and ending locations and headings
def calc_radius(start_head, end_head, start_pos, end_pos):
# translate into local coordinates and calculate distance
end_head +- 90.0 - start_head
start_head = 90.0
dist = ((start_pos['x'] - end_pos['x'])**2.0 + (start_pos['y'] - end_pos['y'])**2.0)**.5
# calculate central angle of triangle
central_angle = end_head - start_head
#ifndef AUTON_SELECTOR_H_
#define AUTON_SELECTOR_H_
#include "main.h"
#include "autons.hpp"
namespace auton_selector {
// main function, creates all objects
void create_display();
#include "dashboard.hpp"
#include "simulate_vars.hpp"
#include "logo_img.c"
#include "../../../../../../../usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h"
//namespace dashboard {
//LV_IMG_DECLARE(logo_img);
void dashboard_create() {