MicroPython example from github project doesn't work on MaixPy


#1

According to another forum thread, I managed to connect my debian computer to MaixPy Go MicroPython console:

  __  __              _____  __   __  _____   __     __ 
 |  \/  |     /\     |_   _| \ \ / / |  __ \  \ \   / /
 | \  / |    /  \      | |    \ V /  | |__) |  \ \_/ / 
 | |\/| |   / /\ \     | |     > <   |  ___/    \   /  
 | |  | |  / ____ \   _| |_   / . \  | |         | |   
 |_|  |_| /_/    \_\ |_____| /_/ \_\ |_|         |_|
 Official Site:xxxxx
 Wiki:xxxxxx
 [MAIXPY]Pll0:freq:320666666
 [MAIXPY]Pll1:freq:159714285
 [MAIXPY]Flash:0xc8:0x17
 [MAIXPY]:Spiffs Mount successful 
 [MAIXPY]LCD:init
 
 MicroPython 3b5c45649-dirty on 2018-11-15; Sipeed_M1 with kendryte-k210
 Type "help()" for more information.
 >>> import machine
 >>> dir(machine)
 ['__class__', '__name__', 'GPIO', 'burner', 'demo_face_detect', 'devmem', 'esp8285', 'fpioa', 'ov2640', 'pwm', 'spiflsah', 'st7789', 'test', 'timer', 'uart', 'uarths', 'ws2812', 'zmodem']
 >>> dir(machine.GPIO)
 ['__class__', '__name__', 'DM_INPUT', 'DM_INPUT_PULL_DOWN', 'DM_INPUT_PULL_UP', 'DM_OUTPUT', 'GPIO0', 'GPIO1', 'GPIO2', 'GPIO3', 'GPIO4', 'GPIO5', 'GPIO6', 'GPIO7', 'HIGH_LEVEL', 'LOW_LEVEL', 'help', 'init', 'toggle', 'value']
 >>> dir(machine.demo_face_detect)
 ['__class__', '__name__', 'init', 'process_image']

But if I try example from github project MaixPy, it doesn’t work:

>>> import sensor
>>> import image
>>> import lcd
>>> lcd.init()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: no such attribute
>>> dir(lcd)
['__class__', '__name__']

There is no more I2C :

 >>> from machine import I2C
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name I2C

Is the github is for MaixPy Go ? Or maybe that firmware on MaixPy GO should be upgraded ?


#2

@Martoni, I have tested this today with the new 2019.2.19 MAIXPY beta 0.1.1 and it works OK.