In demo_mic_array.py ImportError: cannot import name MIC_ARRAY


#1

Firmware: maixpy_v0.2.4_full.bin from here

from Maix import MIC_ARRAY as mic
Traceback (most recent call last):
File “”, line 1, in
ImportError: cannot import name MIC_ARRAY

In the release description “v0.2.4 Add microphone array support”.
This is true?


#2

I have downloaded the latest github version of maixpy and compiled it myself. Then it does work:

>>> from Maix import MIC_ARRAY as mic
>>> dir(mic)
['__class__', '__name__', 'deinit', 'get_dir', 'get_map', 'init', 'set_led']

#3

I download the v0.2.4 full version, it works…


from Maix import MIC_ARRAY as mic
import lcd

lcd.init()
mic.init()

while True:
    imga = mic.get_map()
    b = mic.get_dir(imga)
    a = mic.set_led(b,(0,0,255))
    imgb = imga.resize(160,160)
    imgc = imgb.to_rainbow(1)
    a = lcd.display(imgc)
mic.deinit()


#4

The problem was in K-Flash (windows 7) - the new firmware did not download.
After the reboot, the old version of MaixPy started.
Loading v0.2.4_full_version in Kendeyte IDE solved the problem.