blob: 372520725f668e193ff185504b818aea6829519f [file] [log] [blame]
Austin Schuhc0ec2a82022-02-24 17:26:29 -08001#!/bin/bash
2
3CONFIG=/boot/config.txt
4
5if grep -q adis16505 "${CONFIG}"; then
6 echo "Already enabled"
7 exit 0;
8fi
9
10sed -i '1h;1!H;$!d;x;s/.*dtparam=spi[^\n]*/&\n\n# Enable the IMU\ndtoverlay=adis16505/' "${CONFIG}"
11
12echo "Enabled 16505"