pycom / pycom-libraries

MicroPython libraries and examples that work out of the box on Pycom's IoT modules
331 stars 376 forks source link

TypeError: object with buffer protocol required in accelerometer_wake example #42

Closed titusece closed 6 years ago

titusece commented 6 years ago

Hello, Using 'Pysense' board and getting the below error when I run the _accelerometerwake example.

Traceback (most recent call last):
  File "main.py", line 18, in <module>
  File "/flash/lib/LIS2HH12.py", line 119, in enable_activity_interrupt
TypeError: object with buffer protocol required

https://github.com/pycom/pycom-libraries/blob/master/examples/accelerometer_wake/main.py

Getting this error when encounter the below line of code. https://github.com/pycom/pycom-libraries/blob/master/pysense/lib/LIS2HH12.py self.i2c.writeto_mem(ACC_I2CADDR , ACT_THS, _ths)

What could be the problem ? Can you please help me ?

jmsalomr commented 6 years ago

Hello, Have the same problem. Any advice? Can anyone help?

danspndl commented 6 years ago

Hi @titusece and @jmsalomr,

I've just tested the example code, it seems to be working fine. Make sure you're using the latest firmware and libraries. This might have been fixed in one of the updates. Feel free to reopen the issue if you're still having problems, but I'll close this for now.