Skip to content

Instantly share code, notes, and snippets.

obj-$(CONFIG_AK8975) += ak8975.o
/*
* Copyright (C) 2012,2019 Texas Instruments Incorporated - http://www.ti.com/
*
* 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.
*
*/
/dts-v1/;
/*
* Copyright (C) 2012,2019 Texas Instruments Incorporated - http://www.ti.com/
*
* 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.
*
* Created with help from Daniel Kulp
*
* Tested with http://adafrui.it/3678
debian@beaglebone:~$ sudo iwlist SoftAp0 txpower
SoftAp0   2 available transmit-powers :
	  0 dBm  	(1 mW)
	  25 dBm  	(255 mW)
          Current Tx-Power:25 dBm  	(316 mW)

debian@beaglebone:~$ sudo iw dev SoftAp0 set txpower fixed 2500
debian@beaglebone:~$ sudo iw dev SoftAp0 info
Interface SoftAp0
/*
* Copyright (C) 2012,2019 Texas Instruments Incorporated - http://www.ti.com/
* Copyright (C) 2015 Robert Nelson <robertcnelson@gmail.com>
* Copyright (C) 2015 Sebastian Jegerås
*
* 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.
*/
/dts-v1/;

Host

debian@beaglebone:/var/lib/cloud9$ hciattach /dev/ttyS5 bcm43xx 921600 noflow bdaddr AA:AA:AA:AA:AA:AA
bcm43xx_init
Cannot open directory '/etc/firmware': No such file or directory
Patch not found, continue anyway
Set BDADDR UART: AA:AA:AA:AA:AA:AA
Set Controller UART speed to 921600 bit/s
Device setup complete
debian@beaglebone:/var/lib/cloud9$ sudo bluetoothctl
@jadonk
jadonk / README.md
Last active October 10, 2019 19:31
git clone https://gist.github.com/jadonk/8ece4ad83ac67e5215af6a3d686d0ae2
cd 8ece4ad83ac67e5215af6a3d686d0ae2
sudo ./thrash_motors.sh
sudo ./pwmcleaner.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/;
/ {
@jadonk
jadonk / whitherbone.dts
Created February 20, 2019 16:13
whitherbone
/*
* 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
*/
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'