Author Topic: "USB memory" and Arduino on same serial port?  (Read 397 times)

0 Members and 1 Guest are viewing this topic.

Offline MysteriousHTopic starter

  • Newbie
  • Posts: 2
  • Country: se
"USB memory" and Arduino on same serial port?
« on: May 01, 2022, 07:46:50 pm »
Yes, "'USB memory' and Arduino on same serial port?" might be the wrong question to ask, but thats why am asking, since I am not sure what to actually ask...

So, what is it I actually want to do? Well the basic idea is to build a datalogger (i.e. a Arduino with an amplifier circuit to read temperature/strain etc.), which when connected to a PC launches an executable from its memory to display the readings (with some additional features). My limited understanding of the issue is that the memory and the datalogger would not be able to share the same serial port and an usb hub circuit would be needed, or is there some nice searchterm to Google? Doing something like alternating between the sources, loading the executable into RAM and then switching to the Arduino serial or something similiar?

Or should I just read up a bit on serial comms?

Thank you in advance, for any searchterms, or other advice you may provide  :)
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 11561
  • Country: ch
Re: "USB memory" and Arduino on same serial port?
« Reply #1 on: May 01, 2022, 08:04:53 pm »
USB storage doesn’t use serial communications.

Basically, what you want is some kind of microcontroller that can both access a storage medium of some kind and present it to the computer as a USB Mass Storage device. (The latter is a requirement if you want to be able to launch a program from the storage.)

Apparently, this kind of thing has been done before: https://hackaday.com/2019/05/29/drag-and-drop-files-on-select-arduino-boards/

But it seems it won’t work with every type of Arduino, and is quite difficult: https://forum.arduino.cc/t/arduino-as-mass-storage-device/872958
 
The following users thanked this post: MysteriousH

Offline MysteriousHTopic starter

  • Newbie
  • Posts: 2
  • Country: se
Re: "USB memory" and Arduino on same serial port?
« Reply #2 on: May 01, 2022, 08:19:15 pm »
Thank you for the reply, nice links and an clear indication that I should read up at bit more the topic of USB interfacing in general  :-+

If having the microcontroller access and present the memory as a "USB Mass Storage device" doesn't work out, the stupid solution would just be to make/add a USB hub so it appears as two separate devices? ignore this, I'll just test it myself to see if it works :)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf