How to work OTG in ES32-S2 with MicroPython?

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
User avatar
AmirJ
Posts: 26
Joined: Tue Sep 03, 2019 9:48 am

How to work OTG in ES32-S2 with MicroPython?

Post by AmirJ » Fri May 06, 2022 11:49 am

Hi

I want read and write file in usb flash memory by esp32-S2 with micropython.
I want to install a USB on ESP32 using OTG and read and write the file from it.
Has anyone done this?
Please help me in this case.
Last edited by AmirJ on Mon May 09, 2022 10:41 am, edited 1 time in total.

tepalia02
Posts: 99
Joined: Mon Mar 21, 2022 5:13 am

Re: How to work OTG in ES32-S2 with MicroPython?

Post by tepalia02 » Sat May 07, 2022 10:46 am

Could not find any micropython library for doing this task. Let's see what the other users have to say.

User avatar
karfas
Posts: 193
Joined: Sat Jan 16, 2021 12:53 pm
Location: Vienna, Austria

Re: How to work OTG in ES32-S2 with MicroPython?

Post by karfas » Sat May 07, 2022 11:18 am

AmirJ wrote:
Fri May 06, 2022 11:49 am
I want read and write file in usb flash memory by esp32-S2 with micropython.
What exactly means the term "USB flash memory" for you ?
The flash coming with your ESP gets mounted by micropython at startup - you use the normal python file ops there.
A few hours of debugging might save you from minutes of reading the documentation! :D
My repositories: https://github.com/karfas

User avatar
AmirJ
Posts: 26
Joined: Tue Sep 03, 2019 9:48 am

Re: How to work OTG in ES32-S2 with MicroPython?

Post by AmirJ » Sat May 07, 2022 1:57 pm

HI
I mean usb mass storage device.

User avatar
karfas
Posts: 193
Joined: Sat Jan 16, 2021 12:53 pm
Location: Vienna, Austria

Re: How to work OTG in ES32-S2 with MicroPython?

Post by karfas » Mon May 09, 2022 8:43 am

This does not explain what you mean.

Do you want to mount your ESP32 using OTG-USB as mass storage to some other device ?
Do you want to mount an USB stick using OTG to the ESP32 ?

How is this related to your question "How to work OTG ?"
A few hours of debugging might save you from minutes of reading the documentation! :D
My repositories: https://github.com/karfas

User avatar
AmirJ
Posts: 26
Joined: Tue Sep 03, 2019 9:48 am

Re: How to work OTG in ES32-S2 with MicroPython?

Post by AmirJ » Mon May 09, 2022 10:28 am

HI


Thank you for your attention and patience

yes, I want to install a USB on ESP32 using OTG and read and write the file from it.

Post Reply