respeaker / get_started_with_respeaker

This is the wiki of ReSpeaker Core V2, ReSpeaker Core and ReSpeaker Mic Array.
260 stars 83 forks source link

Control all pixel leds and Set color of one pixel!!! #214

Open reality123 opened 6 years ago

reality123 commented 6 years ago

I want to control one pixel led by controlling arduino . but i only can cntrol all pixel leds . The procedure for controlling all lights is as follows. I'm not sure this is incorrect because I always have failure in running .

if mic.wakeup('respeaker'):
print('Wake up')
data = mic.listen()
try:
text = bing.recognize(data) if text:
print('Recognized %s' % text) if 'turn red' in text: print('turn red !') pixel_ring .set_color(rgb=0xff0000)

when i want to control one pixel , I think I should add the necessary procedures in this 'pixels_pattern.ino' Program section: for (int i = 0; i < PIXELS_NUM; i++) { pixels->set_color(i, Pixels::RGB(0, 0, i * 255 / (PIXELS_NUM - 1))); } pixels->update();

but i don't know how to change it and How to transfer the program of controlling LED on arduinovia Python?I don't know too much about the use of SPI.

Can anyone discuss with me to help me solve this problem?

CaptStephan commented 5 years ago

Did you solve this issue?