{"id":24237,"library":"pigpio","title":"pigpio","description":"pigpio is a Python module for controlling the Raspberry Pi's GPIO pins. It provides both local and remote GPIO control via the pigpio daemon. Current version is 1.78, with infrequent releases.","status":"active","version":"1.78","language":"python","source_language":"en","source_url":"https://github.com/joan2937/pigpio","tags":["raspberry-pi","gpio","hardware","pigpio"],"install":[{"cmd":"pip install pigpio","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"Host parameter is deprecated; omit or use host='' for local","wrong":"import pigpio\npi = pigpio.pi('localhost')","symbol":"pi","correct":"import pigpio\npi = pigpio.pi()"}],"quickstart":{"code":"import pigpio\nimport time\n\npi = pigpio.pi()\nif not pi.connected:\n    print(\"Failed to connect to pigpio daemon\")\n    exit(1)\n\npi.set_mode(17, pigpio.OUTPUT)\npi.write(17, 1)\ntime.sleep(1)\npi.write(17, 0)\npi.stop()","lang":"python","description":"Blink an LED on GPIO 17. Requires pigpio daemon (sudo pigpiod) to be running."},"warnings":[{"fix":"Start the daemon: sudo pigpiod","message":"pigpio requires the pigpio daemon to be running before the Python script can connect. If daemon is not running, pi.connected returns False.","severity":"gotcha","affected_versions":"all"},{"fix":"Use pigpio.pi() without arguments for local connection.","message":"Passing a hostname to pigpio.pi() or using pi.serial() may be deprecated in future versions. Use pi = pigpio.pi() for local connection.","severity":"deprecated","affected_versions":">=1.78"},{"fix":"Always use BCM GPIO numbers (e.g., GPIO 17 is physical pin 11).","message":"GPIO numbers are Broadcom (BCM) pin numbers, not physical pin numbers. Common mistake is to use physical pin numbers.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'sudo pigpiod' to start the daemon.","cause":"pigpio daemon not running or not accessible.","error":"Can't connect to pigpio on localhost"},{"fix":"pip install pigpio","cause":"pigpio Python module not installed.","error":"ImportError: No module named pigpio"},{"fix":"Upgrade to latest pigpio: pip install --upgrade pigpio","cause":"Using an older version of pigpio that uses a different API.","error":"AttributeError: module 'pigpio' has no attribute 'pi'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}