Aug-09-2021, 03:45 AM
I don't think that was ever valid Python, but even if it were, you should look for a more up-to-date tutorial. All the comments are from 2012, and the command it uses to write to the I2C bus isn't even supported by the current version of the library.