Forum Rule: Always post complete source code & details to reproduce any issue!
Page 4 of 4 FirstFirst ... 2 3 4
Results 76 to 77 of 77

Thread: Teensyduino 1.52 Beta #1

  1. #76
    Junior Member
    Join Date
    May 2018
    Location
    NYC
    Posts
    15
    I'm sorry if this is not the right place for this, but I've found this problem with our SD library that has already been fixed in the Arduino version of the SD library.

    The main problem is that SD.begin(BUILTIN_SDCARD) returns false when run a second time.
    The obvious solution is to potentially check if SD has already been running before calling SD.begin, but there doesn't seem to be an elegant way to do this.

    While investigating this I noticed that this problem has been fixed in the arduino version of the SD library such that you can call SD.begin as many times as you want. This fix is not present in the Teensyduino version of the SD library. I have tested the fix and it works fine:

    Code:
    boolean SDClass::begin(uint8_t csPin) {
      /*
    
        Performs the initialisation required by the sdfatlib library.
    
        Return true if initialization succeeds, false otherwise.
    
       */
    
      if(root.isOpen()) root.close();
     
      return card.init(SPI_HALF_SPEED, csPin) &&
             volume.init(card) &&
             root.openRoot(volume);
    }

  2. #77
    Junior Member
    Join Date
    Sep 2019
    Posts
    14
    Quote Originally Posted by Frank B View Post
    Ok, i'll deactivate simpledrum, too.
    Let me know if you have a new build to test.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •