[Product Revision] ATOMIC TF-Card Reader (A135) with G39/G38 exposed as Grove



  • ATOMIC TF-Card Reader A135, but expose pins G39 & G38 as an Grove port.



  • I soldered a grove cable to the 38&39 connectors inside mine and it sticks out the end above the card slotr.

    I wager many people use the card reader for logging and with an atom you only get the rear 1&2 pins which limit you to i2c if you want lots of sensors and not all the m5stack sensors are ei2c

    they could make a i2c card reader too, then it coul be part of i2c chain,. although i2c is slow than spi and not work with standard sd library, so would have to be a custom chip controlling it and probably just for pushing data tto log plus extra functions for
    •format card
    •does file exist
    •does folder exists
    •make file
    •make folder
    •append to file
    •move file to folder
    •delete file or folder
    •push current date and time to chip so all create-modified time accurate but not integrated rtc



  • @ifantus
    An I2C SD card reader would be pretty neat and useful, don't think I've ever seen anyone do that. The bus isn't really meant for data like that, but if it were a logging only thing... I might play with that using my reader and a pair of Atoms.

    It would be important to minimized how much data is getting transmitted over I2C though; maybe limit file name length (8.3?) and character set (base ASCII?) possibly excluding anything in folders too (root only), may have to limit what sort of data can be written as well (or send start/stop bytes to encapsulate strings)

    Functions could be something similar to this:

    • Standard stuff dealing with card
      • bool hasCard() # If a card is present
      • type getType() # SD, SDHC, SDXC, etc
      • void formatCard(format) # format the card using "format" (fat32)
      • format getFormat() # get the current format of the card (fat32)
      • uint32_t getCapacity() # get the capacity of the card in bytes
      • uint32_t getSpace() # get the free space of the card in bytes
    • Timestamps (no need for a battery or RTC, just use the internal clock)
      • datetime getDTM() # get current datetime if set
      • void setDTM(datetime) # set the datatime
      • datetime getCreated(str path) # file/folder created date
      • datetime getModified(str path) # file/folder modified date
    • File/Folder Operations
      • bool fileExists(str path) # if file exists
      • bool folderExists(str path) # if folder exists
      • bool createFolder(str path) # create new folder(s) from path
      • bool createFile(str path) # create new file (& parent folder(s)) from path
      • bool move(str path, str path) # move folder/file
      • bool rename(str path, str name) # rename folder/file
      • bool delete(str path) # delete folder/file
      • bool deleteBefore(str path, datetime) # delete any folder/file at path before certain date
      • bool deleteWildcard(str path, str pattern) # delete any folder/file at path matching a simple pattern
    • Data (two ways, just pushing data, might be problematic due to length, or chunking into columns with smaller data)
      • bool append(str path, str/int/float data) # append data to file
      • bool newline(str path) # start a new data line in the specified file
      • bool column(str path, int column, str/int/float data) # write data to new line (columns must be in order)
      • bool return(str path) # end writing to new data line (set modified date)
      • bool truncate(str path) # clear file
    • Other
      • void setAddress(int address) # set I2C address
      • uint16_t getFirmware() # get current firmware version