Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: Using the second USB port Teensey 3.6

  1. #1
    Junior Member
    Join Date
    Dec 2016
    Posts
    2

    Using the second USB port Teensey 3.6

    Hi all ,

    I am working on a project now, and i need to connect Teensey 3.6 to external USB port, which will be connected to flash driver.

    I am a new user for Teensey and Arduino world!

    Any help about how to implement that, and how to write a text file to the flash driver would be highly appreciated.

    Thanks in advance!

  2. #2
    Senior Member
    Join Date
    Apr 2013
    Posts
    1,899
    The Second USB is still a work in progress so not something you really want to be trying as a first go. Short answer is that USB enumeration is complex and there is a big gap between 'example code' and 'works for everybody all the time'.

    If you want to store text files you the SD card slot may do what you want. The Teensy 3.5/6 SD card is a bit special in that it has hardware support, so you need
    https://forum.pjrc.com/threads/36737...l=1#post114355

    Which is I think the most up to date.

    In terms of how you use it once you are up and running see the Arduino SD documentation, which should be matched in the linked library.

    https://www.arduino.cc/en/Reference/SD

  3. #3
    Junior Member
    Join Date
    Dec 2016
    Posts
    2
    Quote Originally Posted by GremlinWrangler View Post
    The Second USB is still a work in progress so not something you really want to be trying as a first go. Short answer is that USB enumeration is complex and there is a big gap between 'example code' and 'works for everybody all the time'.

    If you want to store text files you the SD card slot may do what you want. The Teensy 3.5/6 SD card is a bit special in that it has hardware support, so you need
    https://forum.pjrc.com/threads/36737...l=1#post114355

    Which is I think the most up to date.

    In terms of how you use it once you are up and running see the Arduino SD documentation, which should be matched in the linked library.

    https://www.arduino.cc/en/Reference/SD
    Thank you so much for your help , i am going to use the Teensy 3.6 as the central unit for our Solar Racing Car which receives the reading from all sensors, so i was thinking of using external flash driver so the data will be stored there even if the battery of car switches off. Does the SD card do the same thing?

    Thank you again

  4. #4
    Senior Member
    Join Date
    Apr 2013
    Posts
    1,899
    Sd cards are flash memory so storage is the same part as on the USB drive, just you directly control it rather than sending USB traffic to a controller. If you follow the second link down the bottom you get https://www.arduino.cc/en/Tutorial/Datalogger which is pretty much doing what you want.

    Using the SD card will be smaller, lighter and use less power and give you more control. Only downside would be that USB would work in any PC, where the SD card will need a $5 USB to SD card adaptor to allow you to pull the data.

    Also means you will need to be a bit clever about PCB placement to allow the card to come out, where the USB would have been on wires.

    Thing that catches some people is not using:
    https://www.arduino.cc/en/Reference/FileFlush

Posting Permissions

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