There's always an obstacle.. I implemented the pwm module as described in the link in the previous post, but oddly enough, it didn't work. The error I received: AttributeError: 'module' object has no attribute 'PWM' After some time scratching my head, I came to the realization that somehow my python was running an older version of the RPi.GPIO library, as PWM control was a pretty recent addition to the library. And indeed it was. Not really sure what's happening in detail, but it seems that there are two different... entities? that manage libraries for Python. One is through the usual "apt-get" command and the other is "pip." It appears that Python looks at "pip" first, and it currently linked RPi.GPIO to a really old version of the library. Uninstalling that older version ("pip uninstall RPi.GPIO") and using the version I obtained through apt-get ("apt-get install python-rpi.gpio...
inyong's side/hobby projects

Comments
Post a Comment