|433MHz Keyfob RX/TX|
|Classes to send and receive 433MHz wireless keyfob codes. These keyfobs are widely used for remote control of devices.|
|7-Segment LED Display Multiplexing|
|Script to multiplex several 7-segment LED displays. Each display has the segments a-g and the decimal point connected in parallel but has an individual enable GPIO (connected to the common anode or cathode).|
|Class to read the relative humidity, temperature, and pressure from a BME280 sensor. The sensor has both an I2C and a SPI interface which are both|
supported by the class.
|DHT22 AM2302 Sensor|
|Class to read the relative humidity and temperature from a DHT22/AM2302 sensor.|
|DS18B20 Temperature Sensor|
|Script to read the temperature from any DS18B20 sensors connected to the 1-wire bus.|
To enable the 1-wire bus add the following line to /boot/config.txt and reboot.
By default you should connect the DS18B20 data line to GPIO 4 (pin 7).
Connect 3V3 or 5V for power, ground to ground, 4k7 pull-up on data line to 3V3, and data line to GPIO 4.
This script uses the file features of pigpio to access the remote file system.
The following entry must be in /opt/pigpio/access.
|Class to read a Shinyei PPD42NS Dust Sensor, e.g. as used in the Grove dust sensor.|
|Script to display the status of GPIO 0-31.|
|Hall Effect Sensor|
|Program to show status changes for a Hall effect sensor.|
|HX711 24-bit ADC|
|Class to read the channels of a HX711 24-bit ADC.|
|I2C ADXL345 Accelerometer|
|Script to display the X, Y, and Z values read from an ADXL345 accelerometer.|
|I2C HMC5883L Magnetometer|
|Script to display the X, Y, and Z values read from a HMC5883L Magnetometer (compass).|
|I2C ITG3205 Gyroscope|
|Script to display the X, Y, Z, and temperature values read from an ITG3205 gyroscope.|
|I2C LCD Display|
|Class to display text on a LCD character display. The class supports the PCF8574T 8-bit I2C port expander connected to a HD44780 based LCD display. These displays are commonly available in 16x2 and 20x4 character formats.|
|I2C slave device|
|This script demonstrates how to transfer messages from an Arduino acting as the I2C bus master to the Pi acting as an I2C slave device.|
|A program to passively sniff I2C transactions (100kHz bus maximum) and display the results.|
|A class to read up to 8 HC-SR04 sonar rangers connected to an MCP23017 port expander.|
|Class to hash a code from an IR receiver (reading an IR remote control).|
|IR Record and Playback|
|This script may be used to record and play back arbitrary IR codes.|
To record the GPIO connected to the IR receiver, a file for the recorded codes, and the codes to be recorded are given.
E.g. ./irrp.py -r -g4 -fir-codes vol+ vol- 1 2 3 4 5 6 7 8 9 0
To playback the GPIO connected to the IR transmitter, the file containing the recorded codes, and the codes to be played back are given.
E.g. ./irrp.py -p -g18 -fir-codes 2 3 4
./irrp.py -h # for options
|Kivy GPIO control|
|This example shows how to use Kivy to control a Pi's GPIO. The GPIO may be configured as inputs, outputs, or to generate Servo or PWM pulses. Kivy is an Open source Python library for rapid development of applications.|
|MAX6675 SPI Temperature Sensor|
|A script to read the temperature from a MAX6675 connected to a K-type thermocouple. The MAX6675 supports readings in the range 0 - 1023.75 C. Up to 4 readings may be made per second.|
|Script to monitor GPIO for level changes. By default all GPIO are monitored. At a level change the GPIO, new level, and microseconds since the last change is printed.|
|Script to transmit the morse code corresponding to a text string.|
|PCA9685 16 Channel PWM|
|Class to control the 16 PWM channels of the I2C PCA9685. All channels use the same frequency. The duty cycle or pulse width may be set independently for each channel.|
|Script to display readings from the (I2C) PCF8591.|
|Script to benchmark the pigpio Python module's performance.|
|Script demonstrating how to access the pigpio daemon using CGI from a browser. Instructions on how to use with Apache2 on the Pi are given in the comments.|
|Pot + Capacitor Recharge Timing|
|Class to time capacitor charging (through a resistance). The time can be used to estimate the resistance.|
|Class to monitor a PWM signal and calculate the frequency, pulse width, and duty cycle.|
|Class to decode a mechanical rotary encoder.|
|Class to monitor speedometer pulses and calculate the RPM (Revolutions Per Minute).|
|Si7021 I2C Temperature and Humidity Sensor|
|Class to read the temperature and relative humidity from a Si7021.|
|A program to passively sniff SPI transactions and display the results. The SPI rate should be limited to about 70kbps if using the default pigpio 5µs sampling rate.|
|Servo Pulse Generator|
|This script generates servo pulses on one or more GPIO. Each connected servo is swept between 1000µs and 2000µs at a different speed.|
./servo_demo.py # Generate pulses on GPIO 4.
./servo_demo.py 5 9 20 # Generate pulses on GPIO 5, 9, and 20.
|Class to read sonar rangers with separate trigger and echo pins.|
|TCS3200 Colour Sensor|
|Class to read the TCS3200 colour sensor|
|Class to send and receive radio messages compatible with the Virtual Wire library for Arduinos. This library is commonly used with 313MHz and 434MHz radio tranceivers.|
|Wave PWM 1|
|Script to show how waves may be used to generate PWM at (one) arbitrary frequency on multiple GPIO. For instance PWM at 10kHz may be generated with 100 steps between off and fully on.|
|Wave PWM 2|
|Class to generate PWM on multiple GPIO. It is more flexible than the Wave PWM 1 example in that the start of the pulse within each cycle may be specified as well as the duty cycle. The start and length of each pulse may be specified on a GPIO by GPIO basis in microseconds or as a fraction of the cycle time. The class includes a __main__ to demostrate its ability to send servo pulses.|
|Class to read a Wiegand reader.|