0

Why am always getting this error when calling pigpio.start():

Traceback (most recent call last):
  File "/home/pi/aa.py", line 9, in <module>
    pigpio.start()
AttributeError: 'module' object has no attribute 'start'

After installing pigpio.

  • Welcome to Raspberry Pi! Please take the tour and visit the helpcenter to see how things work here. – Ghanima Nov 6 '16 at 20:56
1

pigpio.start() was deprecated (removed and replaced) years ago.

pigpio now allows multiple Pis to be controlled from one script.

You should now be using the following style.

#!/usr/bin/env python

import pigpio

pi = pigpio.pi() # connect to Pi

if not pi.connected:
   exit()

pi.write(4, 1) # set GPIO 4 high

level = pi.read(7) # read GPIO 7

pi.stop() # disconnect from Pi

See pigpio Python examples.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.