How to disable LEDs of the respeaker 2mic pihat

info about ReSpeaker series products

Moderators: lily.li, violet, seth.welday

Post Reply
Anonymous
Kindergarten
Kindergarten
Posts: 92
Joined: Mon Jun 03, 2019 10:58 am

How to disable LEDs of the respeaker 2mic pihat

Post by Anonymous » Fri Mar 29, 2019 6:49 am

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.

Seeed Tech Support
Pre-kindergarten
Pre-kindergarten
Posts: 0
Joined: Mon Jun 03, 2019 10:51 am

Post by Seeed Tech Support » Fri Mar 29, 2019 10:59 am

Hi 


daichi 

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

step 1. 

sudo pip install spidev
cd ~/
git clone https://github.com/respeaker/mic_hat.git
cd mic_hat
nano pixels.py

step 2.


change the pixels.py bottom part as below.

if __name__ == '__main__':

    pixels.off()
    time.sleep(1)

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"
fi

python /home/pi/mic_hat/pixels.py

exit 0


 step 4. reboot

Thanks

best rgds
Bill


Post Reply