Skip to content

Instantly share code, notes, and snippets.

View philipturner's full-sized avatar
🏠
Working from home

Philip Turner philipturner

🏠
Working from home
View GitHub Profile
#include "IC/ADC.h"
#include "IC/CDC.h"
#include "IC/DAC.h"
#include "Metrology/Metrology.h"
#include "Time/KilohertzLoop.h"
#include "Time/TimeStatistics.h"
#include "Util/Application.h"
#include "Util/Bitset.h"
#include "Util/Rickroll.h"
#include "IC/ADC.h"
#include "IC/CDC.h"
#include "IC/DAC.h"
#include "Metrology/Metrology.h"
#include "Time/KilohertzLoop.h"
#include "Time/TimeStatistics.h"
#include "Util/Application.h"
#include "Util/Bitset.h"
Metrology::Mode currentMode;
#include "IC/ADC.h"
#include "IC/CDC.h"
#include "IC/DAC.h"
#include "Time/KilohertzLoop.h"
#include "Time/Oscilloscope.h"
#include "Time/TimeStatistics.h"
#include "Util/Application.h"
#include "Util/Bitset.h"
TimeStatistics timeStatistics;
#include "IC/CDC.h"
#include "Time/Oscilloscope.h"
#include "Util/Application.h"
#include "Util/Bitset.h"
void setup() {
Application::setupSerial();
Application::setupSPI();
Application::setupI2C();
#include "DAC.h"
void transferDAC2(uint8_t byte0, uint8_t byte1, uint8_t byte2) {
uint8_t bytes[3];
bytes[0] = byte0;
bytes[1] = byte1;
bytes[2] = byte2;
// TODO: When done with this investigation, archive the valuable
// data in a GitHub Gist.

Molecular Renderer: Tutorial Video

All copyable terminal commands from the video.

macOS Instructions

Check that the Swift compiler works from the command line.

Application: Terminal

#if os(Windows)
import FidelityFX
import SwiftCOM
import WinSDK
#endif
#if os(Windows)
private func createFFXSurfaceFormat(
_ format: DXGI_FORMAT
) -> FfxApiSurfaceFormat {
import Foundation
import GIFModule
import HDL
import MM4
import MolecularRenderer
import QuaternionModule
import xTB
// MARK: - User-Facing Options
@philipturner
philipturner / FIRE.swift
Last active December 8, 2025 22:08
GitHub Gist for the stannatrane tripod test
//
// FIRE.swift
// MolecularRendererApp
//
// Created by Philip Turner on 5/31/24.
//
import HDL
import Numerics
@philipturner
philipturner / FIRE.swift
Last active November 11, 2025 23:41
GitHub Gist for the MM4 energy minimization test
//
// FIRE.swift
// MolecularRendererApp
//
// Created by Philip Turner on 5/31/24.
//
import HDL
import Numerics