Skip to content

feat: add RIS fps example with FT42222#50

Closed
xchux wants to merge 1 commit into
masterfrom
feature/ris-fps-example
Closed

feat: add RIS fps example with FT42222#50
xchux wants to merge 1 commit into
masterfrom
feature/ris-fps-example

Conversation

@xchux

@xchux xchux commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

This pull request adds a new example script, FT4222_example.py, which demonstrates how to use the python-ft4222 library to configure and trigger an SPI device (specifically, setting a pattern ID and triggering FPS) using the FT4222 chip. The script includes device detection, SPI master initialization, and robust logging to guide users through the process.

The most important changes are:

New Example Script for SPI Communication:

  • Added FT4222_example.py as a comprehensive example for initializing an FT4222 device, setting up SPI master mode, and sending commands to configure and trigger FPS on an external device.

Logging and Error Handling:

  • Implemented detailed logging for each major step (device detection, opening, initialization, and command execution) and added exception handling to provide clear error messages if something goes wrong.

SPI Command Implementation:

  • Introduced the set_fps_config function to encapsulate the logic for sending the pattern ID and trigger commands over SPI, making the code modular and easier to maintain.

Copilot AI review requested due to automatic review settings June 25, 2026 01:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Python example demonstrating how to use the python-ft4222 library to detect an FT4222 device, initialize SPI master mode, and send SPI commands to set a RIS_FPS pattern ID and trigger FPS.

Changes:

  • Added FT4222_example.py showcasing FT4222 device discovery and SPI master initialization.
  • Implemented set_fps_config() helper to send pattern-ID and trigger commands over SPI.
  • Added step-by-step logging and exception handling to guide users through execution.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +19 to +21
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
"""
@xchux xchux closed this Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants