Skip to content

Instantly share code, notes, and snippets.

View chadparker's full-sized avatar

Chad Parker chadparker

View GitHub Profile
Comprehensive Technical Analysis of Digitally Addressable LED Systems for Residential Architectural Integration
The evolution of solid-state lighting has transitioned from simple on-off circuitry to sophisticated, software-defined environments where every individual photon-emitting element can be discretely addressed. This transition, largely catalyzed by the development of the integrated circuit (IC) controlled light-emitting diode (LED), has revolutionized residential lighting design by allowing for dynamic, temporal, and spectral control that was previously the sole domain of theatrical and commercial installations. For the modern residential user, navigating the landscape of "individually addressable" LEDs—frequently referred to by the Adafruit brand name "NeoPixels"—requires a technical understanding of the relationship between data protocols, spectral diode configurations, electrical distribution, and mechanical protection.
The Architecture of Digital Addressability and Chipset Protocols
At the core of
@chadparker
chadparker / a.md
Created March 24, 2025 05:16
Test 1

This is a test.

import Foundation
extension String {
func anotherContains(_ input: String) -> Bool {
let selfString = self.lowercased()
let inputString = input.lowercased()
return selfString.range(of: inputString) != nil
}
}
import Foundation
func expandTheNumber(_ number: Int) -> [Int] {
// get array of digits
let digits = String(number).map { Int(String($0))! }
// get array of reversed indexes, i.e. [2, 1, 0]
let reversedIndexes = Array(digits.enumerated().map { $0.offset }.reversed())
@chadparker
chadparker / palindrome.swift
Last active February 11, 2020 04:21
Palindrome checker
import Foundation
// Requirements:
// ignore case, whitespace, and punctuation
// check from each end of the string
// deal with even or odd amount of characters
func canBePalindrome(_ string: String) -> Bool {
var preparedString = string.lowercased()