{"id":20427105,"url":"https://github.com/pi4j/pi4j-example-devices","last_synced_at":"2025-04-12T19:10:22.438Z","repository":{"id":37074639,"uuid":"295532612","full_name":"Pi4J/pi4j-example-devices","owner":"Pi4J","description":"Device support project for the TCA9548 (1x8 I2C switch)","archived":false,"fork":false,"pushed_at":"2025-04-12T04:10:52.000Z","size":51871,"stargazers_count":14,"open_issues_count":1,"forks_count":8,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-12T19:10:03.155Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pi4J.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-14T20:35:01.000Z","updated_at":"2025-04-12T04:10:57.000Z","dependencies_parsed_at":"2023-01-31T05:46:27.067Z","dependency_job_id":"3c7821dc-035c-4ba4-ba52-21454859186a","html_url":"https://github.com/Pi4J/pi4j-example-devices","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pi4J%2Fpi4j-example-devices","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pi4J%2Fpi4j-example-devices/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pi4J%2Fpi4j-example-devices/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pi4J%2Fpi4j-example-devices/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pi4J","download_url":"https://codeload.github.com/Pi4J/pi4j-example-devices/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248618277,"owners_count":21134200,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T07:18:55.109Z","updated_at":"2025-04-12T19:10:22.432Z","avatar_url":"https://github.com/Pi4J.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Pi4J :: Java I/O Library for Raspberry Pi :: Devices\n====================================================\n\nCollection of devices implemented for use with Pi4J V2.\n\nProject by Tom Aarts.\n\n```text\nNote: This repository has a tag identifying the code level that works with\n2.4.0-SNAPSHOT.   Commits newer than this tag are migrations to the \n2.6.0-SNAPSHOT. These commits may contain  code using providers and/or Pi4J-V2\ninterfaces not available in prior SNAPSHOTs.. \n```\nThe following lists the currently supported devices within this project:\n\n* [1602A LCD  HD44780U](src/main/java/com/pi4j/devices/hd44780u_lcd1602a/README.md): App uses SN74HC595 to control the LCD\n* [1602A LCD MCP23017 I2C  Controller](src/main/java/com/pi4j/devices/mcp23017_lcd1602a/README.md): App uses MCP23017 to control the LCD\n* [1602A_LCD_PCF8574A I2C  Controller](src/main/java/com/pi4j/devices/pcf8574a_lcd1602a/README.md): App uses PCF8574A to control the LCD\n* [ADS1255/ADS1256 24bit A-to-D](src/main/java/com/pi4j/devices/ads1256/README.md) (1)\n* [Basic_ADS1256 24bit A-to-D](src/main/java/com/pi4j/devices/basic_ads1256/README.md) (1)\n* [AT24C512 SEEPROM](src/main/java/com/pi4j/devices/at24c512/README.md) (1) (2)\n* [BMP280  Temperature and Pressure Sensor](src/main/java/com/pi4j/devices/bmp280/README.md) (1)\n* [BME280  Temperature, Pressure and Humidity Sensor (I2C \u0026 SPI)](src/main/java/com/pi4j/devices/bme280/README.md) (1)(3)\n* [DAC8552  16bit DAC  SPI connected](src/main/java/com/pi4j/devices/dac8552/README.md) (3)\n* [DHT22 Temp/Humidity sensor](src/main/java/com/pi4j/devices/dht22/README.md) (1)\n* [HC-SR04 Ultrasonic Sensor](src/main/java/com/pi4j/devices/hcsr04/README.md)\n* [Is31fl3731 matrix controller](src/main/java/com/pi4j/devices/is31Fl37Matrix/README.md) (1)\n* [MCP23008 drive and read chip GPIOs](src/main/java/com/pi4j/devices/mcp23008/README.md)\n* [MCP23008 and MCP23017 Pin monitoring (interrupt support)](src/main/java/com/pi4j/devices/mcp23xxxApplication/README.md)\n* [MCP23017 drive and read chip GPIOs](src/main/java/com/pi4j/devices/mcp23017/README.md)\n* [MCP3008 A/D 10bit converter](src/main/java/com/pi4j/devices/mcp3008/README.md) (1)(3)\n* [MCP4725  12 bit DAC](src/main/java/com/pi4j/devices/mcp4725/README.md) (1)\n* [MPL3115A2 Temp/Pressure/Altitude device](src/main/java/com/pi4j/devices/mpl3115a2/README.md) (1)\n* [NeoPixel94V  Intelligent Control LED device](src/main/java/com/pi4j/devices/neopixel94v/README.md) (1)(3)\n* [QT Rotary Encoder](src/main/java/com/pi4j/devices/rotary_encoder/README.md) (1)\n* [SN74HC595 8 Bit shift register](src/main/java/com/pi4j/devices/sn74hc595/README.md) (1)\n* [SSD1306 OLED I2C](src/main/java/com/pi4j/devices/ssd1306/README.md) (1)\n* [TCA9548 (1x8 I2C switch)](src/main/java/com/pi4j/devices/tca9548/README.md)\n* [VL53L0X TimeOfFlight device](src/main/java/com/pi4j/devices/vl53L0X/README.md) (1)\n\n### Notes:\n\n(1): This package uses code within this repo and Pi4J \\\n(2): Requires 2.2.2-SNAPSHOT of Pi4j that supports i2c multibyte write/restart \\\n(3): SPI versions of the device uses Pigpio, cannot be used on Raspberry Pi5 \\\n\n\n### GPIO monitor\n\nThis repository includes two Python scripts to monitor GPIO pin states in real-time on a Raspberry Pi. \\\n**Note**: These scripts use the pigpio library, which is currently incompatible with the Raspberry Pi 5.\n\n**Setting Up pigpio**\n\nTo install pigpio, run:\n\n```bash\npip install pigpio\n```\n\nAlso, make sure the `pigpiod` daemon is running before executing either script:\n\n```bash\nsudo pigpiod\n```\n\n1. `monitor.py`\n\nThis script provides a detailed, line-by-line log of GPIO state changes, including the time difference in microseconds between state changes for each pin.\n - Usage:\n   \n```bash\npython3 monitor.py              # Monitor all GPIO pins\npython3 monitor.py 23 24 25     # Monitor only GPIO pins 23, 24, and 25\n```\n\n - Features:\n    - Logs state changes (`HIGH`/`LOW`) for each monitored GPIO pin.\n    - Displays the time difference between successive state changes in microseconds.\n    - Structured with modular functions for initializing GPIO monitoring, handling state changes, and cleanup on exit.\n - Example Output:\n\n```bash\nMonitoring GPIO pins... Press Ctrl+C to stop.\nGPIO=23 Level=1 Time Diff=120 μs\nGPIO=24 Level=0 Time Diff=95 μs\nGPIO=25 Level=1 Time Diff=110 μs\n```\n\n2. `monitor_table_format.py`\n   \nThis script offers a compact, tabular format for monitoring GPIO states, displaying the current state of each pin in a single, updating line. This view is ideal for visualizing slow state changes without excessive log clutter.\n\n - Usage:\n```bash\npython3 monitor_table_format.py          # Monitor all GPIO pins\npython3 monitor_table_format.py 23 24 25 # Monitor only GPIO pins 23, 24, and 25\n```\n\n - Features:\n   - Displays pin states in a single, continuously updating line.\n   - Ideal for slow changes, as it reduces visual clutter by showing only the current state of each pin.\n   - Automatically updates the state every second (customizable by adjusting the sleep interval).\n - Example Output:\n\n```bash\nMonitoring GPIO pins... Press Ctrl+C to stop.\nGPIO   23 | 24 | 25\nSTATE   1 |  0 |  1\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpi4j%2Fpi4j-example-devices","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpi4j%2Fpi4j-example-devices","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpi4j%2Fpi4j-example-devices/lists"}