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.
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.
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
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
Thanks
best rgds
Bill