How to disable LEDs of the respeaker 2mic pihat

dear seeed Team

may I ask how to disable LEDs of the respeaker 2mic pihat?

if there are some terminal commands to do it, I would like to hear about it.

The LEDs are always turned on being white, and somewhat bright to me.

thank you.



You can run a python script to turn off the leds as below.

step 1.

sudo pip install spidev
cd ~/
git clone
cd mic_hat

step 2.

change the bottom part as below.

if name == ‘main’:

step 3.

then add the python script into boot process as below.

sudo nano /etc/rc.local

#!/bin/sh -e
# rc.local
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will “exit 0” on success or any other
# value on error.
# In order to enable or disable this script just change the execution
# bits.
# By default this script does nothing.

# Print the IP address
_IP=$(hostname -I) || true
if [ “$_IP” ]; then
printf "My IP address is %s
" "$_IP"

python /home/pi/mic_hat/

exit 0

step 4. reboot


best rgds