MrYsLab / pymata4

A High Performance Python Client For Arduino Firmata
GNU Affero General Public License v3.0
76 stars 30 forks source link

User's Guide error #12

Closed dshaw619 closed 4 years ago

dshaw619 commented 4 years ago

I believe the example code shown on the 1st page of the User's Guide (https://mryslab.github.io/pymata4/) has incorrect indices for the callback data. self.CB_PIN = 0 self.CB_VALUE = 1 self.CB_PIN_MODE = 2 self.CB_TIME = 3

From other code examples on GitHub, shouldn't these be as follows? self.CB_PIN = 1 self.CB_VALUE = 2 self.CB_PIN_MODE = 0 self.CB_TIME = 3

I made these changes and got the 1st page example working correctly.

MrYsLab commented 4 years ago

Great catch thanks. I have updated the page with a working example. Somehow I forgot to update the example when I made changes. A new version of the document is now available online.