I’ve made significant progress with the 3×3 grid, and the Raspberry Pi is now successfully reading both the rows and columns. While I am able to receive readings and see both inputs, I’m not entirely satisfied with the consistency and accuracy of the touchpad at this stage. Occasionally, the sensor may register an incorrect value due to noise or other factors. For example, when touching row 3, it could mistakenly register rows 0, 1, or 2 before eventually defaulting to row 3 after a brief delay.
In addition to working on the core functionality of the touchpad, I’ve also shifted from polling to using interrupts to capture input. This change has brought some noticeable improvements. Polling involves continuously checking for changes in the inputs, which can be inefficient and lead to slower responses, especially when there are multiple inputs being processed at once. By using interrupts, the system can react immediately when a change occurs, rather than having to constantly check. This approach reduces processing overhead and ensures that inputs are captured more quickly, leading to a more responsive system.
However, there are some trade-offs with using interrupts. While interrupts improve responsiveness, they also require careful handling to avoid issues like missing interrupts or overloading the system with too many triggers. Additionally, using interrupts can sometimes make the system more complex to manage, as it introduces additional code to handle interrupt requests and ensure that each one is processed correctly. Despite these challenges, the benefits of faster, more efficient input handling outweigh the downsides, and I’m confident that this approach will lead to a better overall user experience.
Moving forward, my next step will be to focus on fine-tuning the system and improving the accuracy as much as possible. This will involve further adjustments to the sensor calibration and possibly adding noise-reduction techniques to ensure the readings are more reliable. Once that’s addressed, I’ll shift my attention to incorporating these touch inputs into the Sudoku game system. This will involve using the touchpad to select points on the grid and integrating the keypad for grid selection and number input. By combining the touchpad and keypad, I aim to create a seamless and intuitive interface where users can easily navigate the grid and enter values to solve the puzzle.