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
const int PIN_LATCH = 2; | |
const int PIN_CLOCK = 3; | |
const int PIN_DATA = 4; | |
uint8_t readController() { | |
uint8_t buttons = 0; | |
// Latch: capture button states | |
digitalWrite(PIN_LATCH, HIGH); | |
delayMicroseconds(12); |
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 json | |
import zlib | |
def json_to_ssfsav(json_path, output_path): | |
with open(json_path, 'r', encoding='utf-8') as f: | |
json_data = json.load(f) | |
raw = json.dumps(json_data, separators=(',', ':'), ensure_ascii=False).encode('utf-8') | |
compressed = zlib.compress(raw) |
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
#define ECU_OUTPUT_PIN 9 | |
#define POT_INPUT_PIN A5 | |
#define DESIRED_MIN_VOLTAGE 0.0 | |
#define DESIRED_MAX_VOLTAGE 1.0 | |
int potValue = 0; | |
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
#!/bin/bash | |
# Run usbipd.exe list and store the output | |
output=$(usbipd.exe list) | |
# Extract the bus ID for the Silicon Labs device | |
# My ESP32 is a silicon labs device, this is the main part you'll want to change using for example ChatGPT. | |
busid=$(echo "$output" | awk '/Silicon Labs/ {print $1}' | grep -E '^[0-9]+-[0-> | |
# Check if a bus ID was found |