Skip to content

Instantly share code, notes, and snippets.

View README.md
git clone https://gist.github.com/jadonk/8ece4ad83ac67e5215af6a3d686d0ae2
cd 8ece4ad83ac67e5215af6a3d686d0ae2
sudo ./thrash_motors.sh
sudo ./pwmcleaner.sh
View adxl345.sh
#!/bin/sh
echo 7 > /proc/sys/kernel/printk
dmesg -n 7
OVLY=/sys/kernel/config/device-tree/overlays/accel
mkdir -p $OVLY
cat $OVLY/status
dtc -W no-unit_address_vs_reg -@ -o $OVLY/dtbo <<EOF
/dts-v1/;
/plugin/;
/ {
View whitherbone.dts
/*
* Copyright (C) 2017 Seeed Technology Inc.
* Copyright (C) 2018-2019 Texas Instruments
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* dtb=am335x-bonegreen-wireless.dtb
*/
View gist:0aeaa544219c573e4f4515b02943188d
sudo bash -c 'while true; do
echo "(`cat /sys/class/thermal/thermal_zone0/temp`-30000)/75" | bc > /sys/class/leds/beaglebone:green:usr4/delay_on
echo 1 > /sys/class/leds/beaglebone:green:usr4/shot
sleep 1
done'
View gist:fd7941c4de80ed1183dfb22966967c7a
beagle-tester 00C0`dd if=/sys/bus/i2c/devices/0-0050/0-00500/nvmem count=12 skip=16 bs=1`
beagle-tester BWA5`dd if=/sys/bus/i2c/devices/0-0050/0-00500/nvmem count=12 skip=16 bs=1`
@jadonk
jadonk / buzz.pru0c
Created Nov 29, 2018
Play down out TechLab buzzer
View buzz.pru0c
/*
* Copyright (C) 2018 Jason Kridner <jdk@ti.com>, Texas Instruments Incorporated
*
* Source Modified by Zubeen Tolani < ZeekHuge - zeekhuge@gmail.com >
* Based on the examples distributed by TI
*
* Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
View gist:72b230c6f457527490aece08c00c005d
root@beaglebone:~# i2cset -y 2 0x1c 0x2a 0x01
root@beaglebone:~# watch -n0 i2cdump -y 2 0x1c
View PixelOverlay-Countdown.pl
#!/usr/bin/perl
#############################################################################
# PixelOverlay-Countdown.pl - Scroll a Christmas Countdown across a matrix
#############################################################################
# Set our library path to find the FPP Perl modules
use lib "/opt/fpp/lib/perl/";
# Use the FPP Memory Map module to talk to the daemon
use FPP::MemoryMap;
@jadonk
jadonk / code.py
Last active Sep 28, 2018
Tufts CircuitPython Hacking
View code.py
import time
import pulseio
import board
import adafruit_irremote
import digitalio
import neopixel
import busio
import adafruit_lis3dh
i2c = busio.I2C(board.ACCELEROMETER_SCL, board.ACCELEROMETER_SDA)
View stepper.js
var b = require('bonescript');
var step = (function() {
var M1 = 1;
var M2 = 4;
var state = 0;
var enabled = 0;
return function(direction) {
if(!enabled) {
You can’t perform that action at this time.