+# pigpio\r
+pigpio is a C library for the Raspberry which allows control of the\r
+general purpose input outputs (gpios).\r
+\r
+Features\r
+\r
+ sampling and time-stamping of gpios 0-31 between 100,000 and 1,000,000 times per second.\r
+\r
+ provision of PWM on any number of the user gpios simultaneously.\r
+\r
+ provision of servo pulses on any number of the user gpios simultaneously.\r
+\r
+ callbacks when any of gpios 0-31 change state (callbacks receive the time of the event\r
+ accurate to a few microseconds).\r
+\r
+ notifications via pipe when any of gpios 0-31 change state.\r
+\r
+ callbacks at timed intervals.\r
+\r
+ reading/writing all of the gpios in a bank (0-31, 32-53) as a single operation.\r
+\r
+ individually setting gpio modes, reading and writing.\r
+\r
+ socket and pipe interfaces for the bulk of the functionality in addition to the\r
+ underlying C library calls.\r
+\r
+ the construction of arbitrary waveforms to give precise timing of output gpio\r
+ level changes (accurate to a few microseconds).\r
+\r
+ software serial links using any user gpio.\r
+\r
+ rudimentary permission control through the socket and pipe interfaces so users\r
+ can be prevented from "updating" inappropriate gpios.\r
+\r
+ creating and running scripts on the pigpio daemon.\r
+\r
+Interfaces\r
+\r
+The library provides a number of control interfaces\r
+\r
+ the C function interface\r
+\r
+ the /dev/pigpio pipe interface\r
+\r
+ the socket interface (used by the pigs utility and the Python module)\r
+\r
+Utilities\r
+\r
+A number of utility programs are provided\r
+\r
+ the pigpiod daemon.\r
+ the Python module.\r
+\r
+ the pigs command line utility.\r
+\r
+ the pig2vcd utility which converts notifications into the value change dump (VCD)\r
+ format (useful for viewing digital waveforms with GTKWave).\r
+\r
+gpios\r
+\r
+ALL gpios are identified by their Broadcom number. See elinux.org\r
+\r
+There are 54 gpios in total, arranged in two banks.\r
+\r
+Bank 1 contains gpios 0-31. Bank 2 contains gpios 32-54.\r
+\r
+A user should only manipulate gpios in bank 1.\r
+\r
+There are at least three types of board.\r
+\r
+Type 1\r
+\r
+ 26 pin header (P1).\r
+\r
+ Hardware revision numbers of 2 and 3.\r
+\r
+ User gpios 0-1, 4, 7-11, 14-15, 17-18, 21-25.\r
+\r
+Type 2\r
+\r
+ 26 pin header (P1) and an additional 8 pin header (P5).\r
+\r
+ Hardware revision numbers of 4, 5, 6, and 15.\r
+\r
+ User gpios 2-4, 7-11, 14-15, 17-18, 22-25, 27-31.\r
+\r
+Type 3\r
+\r
+ 40 pin expansion header (J8).\r
+\r
+ Hardware revision numbers of 16 or greater.\r
+\r
+ User gpios 2-27 (0 and 1 are reserved).\r
+\r
+It is safe to read all the gpios. If you try to write a system gpio or change\r
+its mode you can crash the Pi or corrupt the data on the SD card.\r