LED control on Mic Array v2

info about ReSpeaker series products

Moderators: lily.li, violet, seth.welday

Post Reply
ningma97
Pre-kindergarten
Pre-kindergarten
Posts: 10
Joined: Thu Sep 06, 2018 8:07 pm

LED control on Mic Array v2

Post by ningma97 » Fri Sep 21, 2018 9:49 pm

Hi,

I am able to change the colour of the LED ring on the Mic Array v2, but for some reason changing the brightness has no effect. I also can't control individual LEDs using the "pixel_ring.write(6, data)" method.

Any idea how to change the brightness?

Many thanks
Ning

bill.yu
Junior-7
Junior-7
Posts: 735
Joined: Mon Apr 02, 2018 11:05 am

Re: LED control on Mic Array v2

Post by bill.yu » Wed Sep 26, 2018 4:50 pm

HI Ning

please try below code and modify the 0x01 to [set brightness, range: 0x00~0x1F]. thanks.

Code: Select all


import time

from pixel_ring import pixel_ring


if __name__ == '__main__':
    pixel_ring.change_pattern('echo')
    while True:

        try:
            pixel_ring.set_brightness(0x01)     
            pixel_ring.think()
        except KeyboardInterrupt:
            break


    pixel_ring.off()
    time.sleep(1)

ningma97
Pre-kindergarten
Pre-kindergarten
Posts: 10
Joined: Thu Sep 06, 2018 8:07 pm

Re: LED control on Mic Array v2

Post by ningma97 » Thu Sep 27, 2018 7:54 pm

Thank you Bill. I got it working in the end. The brightness setting seems to only work if I change the LED colour, otherwise there is no effect.

Best
Ning

Post Reply