From 03c93a553d2e75aaba7adfea6c2b002b85aca0f8 Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Tue, 4 Mar 2025 12:15:29 -0800 Subject: [PATCH] Use platform detect to see if board is Pi5 --- adafruit_shell.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/adafruit_shell.py b/adafruit_shell.py index d004192..f45660f 100644 --- a/adafruit_shell.py +++ b/adafruit_shell.py @@ -697,6 +697,14 @@ def get_board_model(): detector = adafruit_platformdetect.Detector() return detector.board.id + @staticmethod + def is_pi5_or_newer(): + """ + Use PlatformDetect to check if this is a Raspberry Pi 5 or newer + """ + detector = adafruit_platformdetect.Detector() + return detector.board.any_raspberry_pi_5_board + @staticmethod def get_architecture(): """