Using the second USB port Teensey 3.6

Status
Not open for further replies.

A96

New member
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!:)
 
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-Try-SdFat-forTeensy-3-5-3-6?p=114355&viewfull=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
 
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-Try-SdFat-forTeensy-3-5-3-6?p=114355&viewfull=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 :D
 
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
 
Status
Not open for further replies.
Back
Top