Problems with Mycropython 1.10 threading i2c in th e pyboard
Posted: Sun Mar 17, 2019 12:46 pm
Hello to all, first i explain the idea of my project,
it's to use a NeoTrellis RGB Driver PCB for 4x4 Keypad ( https://www.adafruit.com/product/3954)
from adafruit with the micropython (NOT circuitpython i know'it), and in the future to use with the k210 that have the micropython inside
https://www.seeedstudio.com/Sipeed-MAix ... -2872.html
I have found the python deprecated from adafruit and documentation with circuitpython, and i was trying to port this RGB driver and use with micropython
i have a pyboard v1.1 and i have update the firmware to
pybv11-thread-20190125-v1.10.dfu
My problem is with the documentacion https://docs.micropython.org/en/latest/ ... .mem_write
and in my main.py is this code:
import pyb
from machine import I2C
pyb.LED(4).on()
i2c = I2C(1)
i2c.scan()
[46]
the problem is when i want to talk to i2c i have found this error
>>> i2c.mem_write(0x7F,46,0x00)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'I2C' object has no attribute 'mem_write'
What i'm doing wrong? and if you see an easy form to translate the circuitpython i2c to micropython tell me, many thaks in advance.
(sorry english it's not my first language)
it's to use a NeoTrellis RGB Driver PCB for 4x4 Keypad ( https://www.adafruit.com/product/3954)
from adafruit with the micropython (NOT circuitpython i know'it), and in the future to use with the k210 that have the micropython inside
https://www.seeedstudio.com/Sipeed-MAix ... -2872.html
I have found the python deprecated from adafruit and documentation with circuitpython, and i was trying to port this RGB driver and use with micropython
i have a pyboard v1.1 and i have update the firmware to
pybv11-thread-20190125-v1.10.dfu
My problem is with the documentacion https://docs.micropython.org/en/latest/ ... .mem_write
and in my main.py is this code:
import pyb
from machine import I2C
pyb.LED(4).on()
i2c = I2C(1)
i2c.scan()
[46]
the problem is when i want to talk to i2c i have found this error
>>> i2c.mem_write(0x7F,46,0x00)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'I2C' object has no attribute 'mem_write'
What i'm doing wrong? and if you see an easy form to translate the circuitpython i2c to micropython tell me, many thaks in advance.
(sorry english it's not my first language)