Adafruit_Python_PlatformDetect/bin/detect.py
2018-12-04 17:20:17 -07:00

13 lines
314 B
Python

#!/usr/bin/env python3
import adafruit_platformdetect
detect = adafruit_platformdetect.PlatformDetect()
print("Chip name: ", detect.chip.name)
print("Board name: ", detect.board.name)
if detect.board.any_raspberry_pi:
print("Raspberry Pi detected.")
print("Revision code: ", detect.board.pi_rev_code)