I have found a CircuitPython driver but no MicroPython driver for the GY-45 MMA8451 Digital Accelerometer. Can someone point me to a MicroPython driver? If not, I’ll try to port the CircuitPython version, is there a guide for the differences in the two versions of Python that would help me in such a conversion? I suppose getting a CircuitPython board would help me in such a conversion.
Thanks
Larry
GY-45 MMA8451 Module Digital Triaxial Accelerometer
Re: GY-45 MMA8451 Module Digital Triaxial Accelerometer
That looks pretty easy. Only the I2C access methods have to be adapted, in this case simplified. That affctes the methods _read_into(), _write_u8() and _read_u8(). The can be replaced by the i2c module methods writeto_mem, readfrom_mem and readfrom_mem_into.
Re: GY-45 MMA8451 Module Digital Triaxial Accelerometer
Thanks for the response, I have a CircuitPython device coming to me and I'll use it to aid my port of the driver to MicroPython. Will reports my results here.
Thanks
Larry
Thanks
Larry