Skip to content

Commit 69fa183

Browse files
committed
Improve the error message when it fails to read the version in SPI mode
1 parent 859518f commit 69fa183

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

adafruit_stmpe610.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,9 @@ def __init__(self, spi, cs, baudrate=1000000):
278278
version = self.get_version
279279
if _STMPE_VERSION != version:
280280
raise RuntimeError(
281-
"Failed to find STMPE610! Chip Version 0x%x" % version
281+
"Failed to find STMPE610! Chip Version 0x%x. "
282+
"If you are using the breakout, verify you are in SPI mode."
283+
% version
282284
)
283285
super().__init__()
284286

0 commit comments

Comments
 (0)