Skip to content

Instantly share code, notes, and snippets.

@tdack
tdack / README.md
Created June 12, 2016 10:24
Custom handlebars helpers for Ghost, as an app
@tdack
tdack / SharpIR.py
Last active July 20, 2022 07:55
Python object for Sharp 2Y0A21 InfraRed distance sensor (and similar). Includes calibration routine to calculate the coefficient and power for the distance equation
#!/usr/bin/python
import Adafruit_BBIO.ADC as ADC
from time import sleep
import sys
#
# For the BeagleBone Black the input voltage has to be 0-1.8V
# The easiest way is with a voltage divider
#
# Ra Rb
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm 4.4.11 Kernel Configuration
#
CONFIG_ARM=y
CONFIG_ARM_HAS_SG_CHAIN=y
CONFIG_NEED_SG_DMA_LENGTH=y
CONFIG_ARM_DMA_USE_IOMMU=y
CONFIG_ARM_DMA_IOMMU_ALIGNMENT=8
CONFIG_MIGHT_HAVE_PCI=y
@tdack
tdack / build_kernel.sh
Last active February 28, 2023 19:47
Build the kernel for the Next Thing Co C.H.I.P.
#!/bin/bash
# Desktop build
MAKE="make -j 4 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-"
# C.H.I.P. build
#MAKE="make"
CDIR=$PWD
LINUX=$CDIR/CHIP-linux
WIFI=$CDIR/RTL8723BS
@tdack
tdack / io.adafruit.com-bridge.conf
Last active May 2, 2024 15:04
Bridge Mosquitto MQTT broker to io.adafruit.com MQTT broker to use with io.adafruit.com
# Connection name
connection adafruit
# Secure SSL/TLS
address io.adafruit.com:8883
# adjust path as approriate to point to directory with PEM encoded .crt CA files
bridge_capath /etc/ssl/certs/
# Insecure
# address io.adafruit.com:1883