adafruit / Adafruit_CircuitPython_PyPortal

CircuitPython driver for Adafruit PyPortal.
MIT License
45 stars 56 forks source link

Add sd_check function to pyportal #34

Closed colonwq closed 4 years ago

colonwq commented 5 years ago

Both init and fetch access the in self._sdcard parameter to determine if a SD card is installed. init handles the mounting of the card. fetch() alters the filename path as needed prior to calling wget(). This new function will allow the calling of pyportal.sd_check() to determine if a card is present and alter operations as needed. Simple example: if pyportal.sdcheck(): print("SD card is installed") else: print("SD card is NOT installed")