I have not said it before Andreas, but I look forward to : the Swiss accent, The little hand pointer, The hat and the knowledge You share. ThankYou Sir.
Man, I love your existence Andreas. You have no idea how much you can help an undergrad mechatronics student understanding these electronic specifics for embedded development. One day I wish to be like you. Have so much knowledge in all the electronics areas of expertise.
What a fantastic video! I've had some frustration with the basics on the S3 boards and whilst I don't have as many now, you have just answered many questions I had!
Can't wait to see your JTAG video :-) I've always been intrigued by it, I always thought it was some sort of standard programming port (as it seemed to me that's what it's mostly used for), but can't wait to hear you go into the details :-)
It not only can act as a storage device, but it is possible to programatically service block reads and writes. In theory, one can proxy it over the network into a file on some server for infinite space.
Thank you for confirming USB Host mode is not currently present. That was a real head-scratcher when I bought a couple of these a month ago and had to abandon a project. Would have been great to have had this functionality from day 1, but glad I didn't waste my money, cheers!
It works in esp-idf, which is generally a much better way of using them anyway. ESP-idf even has the option to include arduino as a component so you can write code for it just as you would using the arduino ide but with the possibility of using esp-idf specific features too.
@@conorstewart2214 I tried using the ESP-IDF+VScode for the first time. It went reasonably smoothly but for the life of me I could get the "hid_example.c" to recognise when I inserted a USB device into either a female USB-A or USB-B micro breakout board. Would love a video from Andreas to demystify this specific setup! ♥️ PS: I'd spotted the "Arduino.h" include before but didn't realise if was for people using the ESP-IDF, interesting!
หลายเดือนก่อน
@@AndreasSpiess I've dug deep... - but didn't succeed in sending e.g. {0x77, 0xaa, 0x77} from my esp32-s3-zero to another USB device via standard USC C cable. I have connected the 5V to the esp32-s3-zero - which also supplements the USB device - without any problems. Before I shelve the whole project... Do you have an example code I can use for the Arduino IDE to make this work? And what settings do I need to have in the Arduino IDE?
I knew about half of these -- thanks for the comprehensive examination. One of the things I learned was that the C3 had the CDC Mode -- I was, for some reason, thinking that it did not have any integrated USB functionality at all.
Thanks for the video. Please make more about esp32 features and such, especially the esp32-s3. What I love about your videos is the originality. Seems most utubers just copy one another... Waiting on your debug video mentioned here.
@@AndreasSpiess Thank you for the replies. So if I understand correctly, the high speed ports can now be switched to any pins using the I/O Matrix with the ESP32 S3 without issue? I have a product design working great with the original ESP32 WROOM. MicroSD, SPI, I2S and I2C features are all being used. The ESP32 WROOM we are using is now obsolete. So changing gear to update to ESP32 S3. It also appears the serial loader bootstrap pins IO_0 and IO_2 have changed to IO_0 and IO_46 as well? Again, Thank you for your help.
Thank you for this video! I have been banging my head against the wall with an S2-mini board just to get serial print statements. The newer Arduino IDE and the "USB CDC on boot" parameter was the final hint that I needed.
@@AndreasSpiess there is nothing promised and there are some nuances between the chips 😁 you will probably catch some of them while preparing the video. Work on openocd and dbg for newer chips is still ongoing, so expect things to get much better in the future.
Just a notation for everyone trying, for the first time the CDC On boot mode isn't enabled by default; so it must be enabled and any sketch should be uploaded over Serial then after that you will be able to upload over USB. Thank you for the amazing video Andreas
Thanks! This was the final step in my prototype mini ffb wheel. I've got the device recognized as a 1 axis 0 button joystick and the rotary encoder drives the axis input. As a tinkerer only, MAGIC.
@@Bondarev-Y Sorry not yet. I have run into problems with Windows drivers. It is very hard to get Windows to recognize a device as force feedback capable. I've tried hundreds of attempts but Windows doesn't play nice. If you are okay with only one way communications so that is the ESP32 acts as a controller, it is easy. For the ESP32 to be controlled by built in Windows drivers much harder. For now I have just simply recreated this design with 1 rotary encoder and 2 potentiometers. Soon I will add more controls. th-cam.com/video/7g6O4G1OXd4/w-d-xo.htmlsi=ztOf1aowJ5kJ0riX -------- @Bondarev-Y К сожалению, пока нет. Я столкнулся с проблемами с драйверами Windows. Очень сложно заставить Windows распознать устройство как поддерживающее обратную связь. Я пробовал сотни раз, но Windows не идет навстречу. Если вам достаточно односторонней связи, где ESP32 выступает как контроллер, это легко. Но сделать так, чтобы ESP32 управлялся встроенными драйверами Windows, значительно сложнее. На данный момент я просто воссоздал эту конструкцию с одним энкодером и двумя потенциометрами. Вскоре добавлю больше элементов управления. th-cam.com/video/7g6O4G1OXd4/w-d-xo.htmlsi=ztOf1aowJ5kJ0riX
I used the S3 chip in a window sensor design using a USB-C port for programming. So much more convenient than hooking up RS232, especially when they are already glued to the window frame.
Hello! I am making a ESP32-S3 custom PCB. I want USB-C programming, can I just connect it to D+ and D- and then I can just program it, or is there anything else I need to think about in my design?
@@danielliden600 Take care of the correct CC1 and CC2 Resistors. Because the plug fits in both orientations, you need to bridge the pins for both sides on your pcb. Think about power. USB can deliver your 5V, but you have to step it down or use an external source. For my application I rely on the battery for power and use only D+ and D-, but I have CC1 and CC2 designed to put resistors to ground. Not sure if I do this right, but at least it works for me. Further I added pin headers for the old RS232 on the board as well as BOOT and EN buttons to be on the safe side, in case USB does not behave.
@@drstefankrank Thanks for response! From what I understand the ESP is 3.3V board, but the D- D+ is 5V. Do you have yo regulate it down to 3.3V before going to the ESP or is it safe to go directly to ESP?
@@danielliden600 The D- and D+ can be directly attached. Just the power that is delivered through USB is 5V and has to be stepped down to power the ESP if not powered differently. I use a LiFePo4 to power it and for the one time programming I can use this or I use an external 3.3V supply while having it on the bench.
thank you so much Andreas, as usual. I just recently bought a pretty nice rotary encoder screen like the Nest thermostat with an embedded ESP32 S3, and I had no idea how to program it, but includes an addon board that exposes pins 1,2, 20 and 19 - I had no idea why they chose those pins to expose but it all makes sense now.
Great video, thank you. I'm only scratching the surface of ESP32 work, coming from the software world. So this went a little over my head. But I think I can see all kinds of fascinating possibilities.
@@AndreasSpiess Gerne, war ehrlich gemeint! Sie werden sicher mit Anfragen und Kommentaren zugeschüttet. Darf ich Ihnen dennoch eine Frage stellen?.... Nachdem es mir dank Ihres Videos endlich gelungen ist, mein eigenes PCB mit einem ESP-32-S3-WROOM (N8R8) zu designen und bei JLCPCB fertigen zu lassen, stehe ich nun vor einem Rätsel, was mich schier zur Verzweiflung bringt. Die Arduino IDE erkennt das Board und ich kann einen Sketch im CDC-Mode downloaden und nach Reset startet der Code auch und meine 4 LEDs auf meinem kleinen Board blinken wie gewünscht. Hurra! :) Jetzt die schlechte Nachricht, der Code läuft nur, wenn das Board am USB-Port des PCs abgeschlossen ist. Verwende ich ein Steckernetzteil, geht nichts. Habe natürlich andere Netzteile und Kabel, Powerbanks, Direktanschluss von +5V am Spannungswandler mit einem leistungsfähigen Labornetzgerät versucht. Brachte alles keinen Erfolg, obwohl am ESP ganz saubere 3,3V anliegen. Das Board zieht 20 bis 40 mA, also nicht die Welt für den von mir verwendeten AMS1117-3.3 Spannungswandler. Dagegen funktioniert das Board bei Anschluss an andere PCs oder auch an den USB-Port eines Notebooks im reinen Batteriemode immer auf Anhieb. Habe auch schon versucht, IO19 und IO20 (USB_D- und USB_D+) mit einem 15k Pulldown in einen stabilen Zustand zu bringen, hat aber auch nichts gebracht. Haben Sie eine Idee, was die Ursache sein könnte? Verzweifelte Grüße ;) Harald Raufer
@@haraldraufer6992 Remote debugging is hard. I would compare all pins of a board in working condition with one that does not work. There must be a difference. Look also at the serial pins. Maybe they show a brownout or so.
As mentioned in the comments, MCPWM using the Arduino IDE would be a cool video. Another idea is the pulse counter, as that isn't simply available in the Arduino IDE but would be very useful. Something to work on during your summer break! 😊
You mean "USBCDC" as how it is called in the Arduino code? The one supported by the C3 is called HWCDC. The S3 does support both. I prefer the HWCDC as it allows for easier flashing using the web flasher. But the USBCDC does have some more nice features and the code feels slightly more mature compared to HWCDC.
*Had to "burn" that efuse (USB_PHY_SEL) to use native USB? I designed and built a custom board with an S3 and want to get the native USB part functioning so I can program it, as there isn't a USB to UART IC on the PCB. Thanks in advance for answering soon!*
The most defining property of OTG is not worked out yet: the ability to function as a host. That would open up a lot of interesting possibilities: we will be able to connect peripherals to the ESP.
Interesting, but I miss something. How does the ESP magically apply the settings from the Arduino IDE? Are they set when uploading a sketch / compiled into the sketch? If yes, can't you basically brick your dev-board if you accidentally upload something with legacy mode on a board that only exposes the USB pins for uploading in cdc mode?
framework = arduino upload_protocol = esptool monitor_port = COM8 build_flags = -D ARDUINO_USB_CDC_ON_BOOT=1 debug_tool = esp-builtin debug_speed = 10000 build_type = release in windows, you will have two devices when you connect the esp32 S3, one is for the com port the another one is for CDC, ensure to put the driver in the second device, make it right, because not you loose the com port, but that can be easy fixed. th-cam.com/video/b1VkJODi_4w/w-d-xo.html
Thanks a lot for your effort and investigations. USB Host will become very interesting because of the drivers. Maybe they implement generic drivers e.g. for an external keyboard or HDD?
I couldn't get Serial.print() to work with my Lolin S3 Pro. I could program it, but just couldn't print to the serial monitor. After watching this video, I learned about CDC mode and by changing the "USB CDC on Boot:" to "Enabled", its all working!!! Also, in the Arduino IDE, I couldn't get the "ESP32S3 Dev Module" board to work, but selecting the "Lolin S3 Pro" board worked just fine. There are obviously some differences between the two. My next step is to get PlatformIO installed and use it as my primary IDE for projects. I've used it in the past, but need to install it on my new Linux machine. I like the Arduino IDE for simple projects, but like PlatformIO better due to its better layout and functionality. But its a bit more difficult getting started. Thank you for your hard work making such videos!! 😃😃😃
thank you! would have needed this month ago 🙂 I noticed that if I have Serial statements in my code and no computer is connected the ESP has a strange delay. Her this might help: Serial.setTxTimeoutMs(5); // set USB CDC Time TX One other question: what would be a good way to get Serial statements in a deep sleep scenario? I had to start with a 5s delay for debugging, to have enough time to start serial monitor again (serial connection and port stop in deep sleep) Is there a serial monitor auto start option in the arduino IDE or VS/Platformio? Does someone know something usefull?
@@AndreasSpiess on one of my boards i just connected GPIO19/GPIO20 and i power the board also via usb, had to add this line, otherwise i had a slow start on powerbank (for sure more than 2sec)
It should be possible (maybe not with arduino ide) to tell when the usb is connected, so you wouldn’t need to wait for the serial to time out, just only print if the usb was connected at boot.
Hi, I really need help. How to configure the esp32 s3 devkit firmware so that it is seen as a HID device in Windows or Android? I am making a converter that receives a signal from the touch controller of the HID over I2C display touch panel and must transmit these touches to a device connected via USB. I have success in that the touches are seen in the monitor of the arduino ide port, the coordinates of the touches are recognized, the pressing force of 2 fingers at once. But I can not make the ESP32S3 be seen as a HID panel and the touches are transmitted to the operating system. Do I understand correctly that after the firmware I need to connect the ESP32S3 through another USB port? (I have a version of the esp32s3 with two USB ports)
ESP32-C3 "download" or "Strapping pin" is not GPIO ZERO (anymore) - quite a change in the design - but GPIO 9 video description is with letter mistake - I am sure you wanted to say: "S2 C3 S3" ;-)
Hello, I'm a bit baffled. On Arduino IDE "USB Mode" doesn't show up on my ESP32 s2 chip. Is USB OTG enabled by deafault on the ESP32 s2 or is there a way I need to put it in OTG mode
Thanks for the great video Andreas. I have been looking for how to use ESP32 in host mode (I want to use it to convert the signals from a USB Joystick to CPPM for RC) but the information over there is very confusing. There are projects out there using simple arduinos and USB Shield but I wanted something smaller and more flexible to be able to add more functionality.
Do u know how to remove the name followed by the esp in cdc mode cuz i used a esp32s2 and it identified as a board called deneyap mini which is not true and it cause compilation to fail so i need to change it back every time or can i just disable the Arduino ide auto detect function back when we used good old ch340 there's no such problem
Hello, can you help me with a case. I am very close to giving up until I saw your video. There is some hope in sight. Target with Adafruit Metro esp32-s2 Board: Keyboard/Mouse → are connected to the PC: Board → is also connected to the PC (HID): The board "monitors" inputs from the real mouse/keyboard (e.g. key A). The board should react to these inputs by sending new simulated (programmed) inputs to the PC (e.g. for keyboard key A, board input to the PC: key B or a mouse click). The programmed keys or mouse clicks from the board are not triggered by external keys, but exclusively by the hardware input of the mouse and keyboard connected to the PC. If this implementation is not technically achievable with the Metro esp32-s2, which board is suitable for this case?
Your application seems to need a USB host and a USB slave. According to ChatGPT, the ESP32-S3 using the TinyUSB library can do something like that (switching between host and slave), but I have no clue if this works for your application.
@AndreasSpiess Thanks, Chatgpt information is not always clear to me. The information I get from gbpt: the esp32-s3 or the due are better compatible for such a project, but I could not understand exactly why. I think the main reason is the USB-OTG only mode you explained. It is a very important information that is not mentioned anywhere. Thanks for this research.
Thank you, well presented and nicely composed informations. Are you planning to make a video about ZigBee support in C6 and H2 chips? Information seems pretty sparse at the moment regarding ZigBee in a maker context, I think it would really help getting into it...
I'm trying to use built-in JTAG function of ESP32S3, when I connect ESP32S3 to PC's USB, the device named "USB-Enhanced-SERIAL CH343 (COM8)", but not "USB JTAG/serial debug unit". How to solve this?
Good evening sir, could you help me, i am using this ESP32 wroom devkits' but sir problem is showing .. Failed with state -2Connecting to MQTT... How do i solve this problem...thank you
My problem is not the C6 HW, it is its Arduino IDE support… And Matter also seems to move quite slowly. So we will see where and when we can use the C6
Did you choose the Arduino framework over ESP-IDF for any specific reason? ESP-IDF seems to be a more optimized and richer solution (not all available functions in esp-idf are immediately available in the Arduino framework). Thanks in advance for your answer.
Hi Andreas. I have been in the front row for a couple of years so far. As a retired Engineer, I have been playing with ESP32S dev boards and using PlatformIO as my IDE. I was excited by your S3 video and immediately went to Amazon to look for a board that might be easier to debug with. Then got confused. Many of the S3 boards have a USB to serial chip for the 2nd USB port. Some don't. I am guessing that the USB to serial IC is there to "comfort" legacy users? The boards containing 2 USB ports but no USB chip must use the two ports you discussed in the video. I an thinking that the USB chip boards would suffer the same fate of older ESP32 needing the RESET/GPIO0 buttons. And the boards using the two ESP32-S3 ports would debug more reliably. Always enjoy your vids.... Any thoughts?
As you suggest: The USB to serial chip is a „comfort“ function and ok for a development board. For a productive board, I would only add a jumper for RX/TX.
I'm using both C3 SuperMini and S3 Zero, and finally more libraries and board files are slowly being made available. On the S3 Zero, I'm seeing segmentation error: Core dump write failed with error=-1 .. is this because partition or corupt bootloader ?
What a coincidence... I've been working on exactly this for the last 2 weeks. (complete rewrite of my ESPEasySerial wrapper to have a single interface to any possible serial port) One thing to keep in mind for the S3/C3; There is a bug in the Arduino code, which renders the serial port unusable when calling end(). (will be fixed in the next ESP32 Arduino release) Another nice thing from the CDC uart ports is that the host (PC) determines the baudrate, so it doesn't matter which baudrate you set in your terminal program to connec to the ESP.
Hi. Thanks for the video!! I am working on a project about sniffing data froma a meteorological station (Oregon WMR300) via USB, and Im not sure how to do it using a esp32 S3. I am thinking about using the CDC mode but im a bit lost in this.
I bought an ESP32-C on board some time ago. Because I couldn't load a program, I got myself an ordinary ESP32 with serial IC since then I've avoided the ESP32-C and ESP32-S
Hi Andreas - is it possible to contact you regarding some consultancy work? I'm looking to get an ESP32S3 talking to another device. Just sending commands to the peripheral's CDC and getting some text responses. I've achieved this using a USB Max Host board, but would like to use the d+ d- pins and the Arduino IDE.
What about the 5th mode where you use both device and host at the same time with an external USB phy? It uses the JTAG pads but no prob as this is exposed over USB anyway…
Hello there and thank you very much for this video. I am very new to esp32 and absorbing every information I can get. Sorry for maybe a noob question but does running in CDC mode also mean I can still send serial data from esp32 over usb to the computer (like temperature value of temperature sensor) but do not need to install a driver anymore in Windows 10 like when using cp2102 or ch340 ?
This question is not easy to answer. It depends on the protocol you use. For USB, you always need a driver, but often, they are included as a standard.
Very very useful!...i keep learning with your channel....a question for you, what about xh-c2x esp8684h4 ?, i can`t work with arduino ide, i can`t find the right board, this module is part of esp32-c2 family.
Thank you for this video! Can you help me with one moment? I try connect USB device to ESP32-S2 and send some byte to this device. Am I must use CDC mode? And how to connect USB to ESP32 board? D+ to GPIO 20 and D- to GPIO 19? And how to send hex array to USB device? Thanks!
Can I use qty 1. ESP32 to use soil,moisture sensor and control qty 1 water pump? I mau do that if possible because I plant in single containers. Please advise. Also water pump power/size varies in size . How do I address correct power to pump? Thank you and god bless! Alton.
Hello Andreas, could i use the USB(UART0) as serial output and the OTG for JTAG ? could you maybe do a video how we could put a external flash? i thought about using a external flash IC for data logging and using the OTG for quick acces to the csv files for data analysis. thanks in advance.
1. I do not know. You have to try 2. Because I have WiFi on hte chip, I longime ago stopped recording data on the device itself. I transmit it into a database on a server. So I never had the need for logging on the device.
Thanks for your sharing!!! It is very clear. But I met a problem that the window10 device management recognized an unknow USB device. I am not sure that the problem is caused by windows driver or the layout of the PCB or the hardfirm of the ESP32-S3. I use the ESP-IDF on VS code to develop it. I want to ask that when I get a totally new ESP32-S3 that never download any code by me, when I connect it via USB port, could the windows 10 recognize the USB port directly? Thank you very much!
Unfortunately, I cannot do remote debugging. Here, the ESP32-S3 is recognized by my PC. If you bought a regular board, the chance that the board is not working is slight. If you have a custom-built one, check first with a standard one. Maybe your PC does not have the correct driver installed.
@@AndreasSpiess Thank you very much for your reply! It is very kind of you. I have tried the official board and confirmed that the driver was installed. So I am not sure that if I should download a specific firmware to enable the USB port. Anyway, Thanks again. and welcome to China. I want to take you to try much delicious food. 😁
I assume you need host mode to read an USB stick (not supported yet in the Arduino IDE). But you find good internet radio projects with MP3 capabilities
Regarding how the dual-core ESP32-S3 (USB OTG + USB Serial/JTAG) has the combined features of the ESP32-S2 (single LX7, no Bluetooth, JTAG, USB OTG) and the ESP32-C3 (Risc-V, BLE 5, USB Serial/JTAG).. any plans to do a video on how to setup VSCode to debug an ESP32 using an external usb jtag debugger (ex. ESP-Prog)? I've found some older information, but it no longer works with the current IDF and VSCode plugins.
Great video👍 I issue on my side. I connected my esp32-s2 with directly to usb while holding the GPIO0 Hear the sound usb connected Can see unknown device But can not load drivers for the com port. Nor even could find suitable driver for esp32 usb port driver. Could you please help how to do serial port driver. Thanks
I've successfully built custom usb keyboard using ESP32-S2. And then want to add BLE features, so I changed the schematic and using ESP32-S3-FN8 (8MB internal flash). It works as expected, the board detected as HID device when usb plugged in and it can connect wireless via BLE. But when I changed to ESP32-S3-FH4R2 (4MB flash 2MB PSRAM), the code successfully uploaded, but it totally not works. My computer cannot detect it as HID device. Can't understand what caused this. Both have same footprints, and no changes to the schematic. Just wondering if someone has encountered this problem and found a solution.
Hello Andreas Spiess I really appreciate your work - I have not the capabillity, to think into a problem I have. But maybe it would be possible. I just write it now : I want to connect driverless a Multitouchdisplay with a Notebook - so on the multi touch needs to be a host, and on the Notebook a HID Device - In between a porperatery or open source protocol which is NOT Wifi infrastructure mode - maybe over wifi or an Ad Hoc conenction. Now the question do you think this is possible with Arduino or these ESP32 when i find out how the host has to speak with the multitouch display. I really would have an answer before I start making it, and lose a lot of time learning it would not have been possible from the start. [Display] - - [ESP USB Host] ~ ~ wireless ~ ~ [ESP Touch Emulator HID Device] - - - [Notebook/PC] Ich habe auf Englisch geschrieben, damit die Community es auch lesen kann) Schöne Grüße, Pascal
This is a complex project, and I do not know if it is possible. Particularly important is to check the speeds you need to drive the screen. And then if it is worth investing all the time. It will be a long project.
Haven't found a case where I "need" and S3 yet. The original seems fine and I like the classic bluetooth. I use the chip modules and an FTDI to upload new sketches, which so far hasn't really been an issue.
Interesante, se puede hacer transferencia de datos por espNow, q en un lado este el esp conectado a la computadora y a distancia otro esp conectado a un mause?
Great video as always! But I have a strange behaviour on esp33-c3 in cdc mode. I have an application that sends can-bus messages on the internal team-hardware. I can download the app and see all serial.print() via the usb-cable, BUT, when I pull the usb-cable the app slows down the sending of can-messages. It seems as if the loop is hanging on the serial.print() statements about a sec and the times out and send a message, then hangs and so on. If I restore the cable and resets it works again. So there seem to be an issue when the usb-cable is removed that affects the functionality of the code. Any ideas?
I've given up on using Serial for communication with the ESP32. You need to have the ESP32 tethered to a computer, the Arduino IDE terminal isn't the best, and PuTTY is a pain to use. I use BluetoothSerial instead, it's part of the Arduino ESP32 package, and requires very little change to code. I use an app called Serial Bluetooth Terminal on my Android phone, I believe that a similar app is available for IOS.
Thank a lot for this userfull video for my next pcb design Can you give me an advise if i am right i can program in arduino ide by usb direct on port pin 19/20 in CDC mode ("do i keep serial debug on my computer in this mode") and connect my gps on port pin 36 37 normal serial?
So do i understand correctly that if i get bare esp32 s3 wroom chip and connect the pins 19, 20 i can just program it? Or does something have to be flashed there using the USB-UART converter? Thank you for reply, Im not completely sure...
If you refer to PlatformIO, you still use the whole Arduino IDE framework,btw. If you use the Espressif IDF, you loose the possibility to program other chips. I use the Arduino IDE on this channel because it is simple and because people who use PIO can easily convert my projects because they have advanced skills. The reverse direction is not possible for a beginner.
Thanks for this video. I wish espressif would explain this topic better. I play with the ESP32 and the ESP32-C3 using the espressif IDF (eclipse etc). I have pages of confusing notes about the upload working then not working, debugger work or not working, com ports come and go. It seemed once I figured something out - on my next project a couple months later things worked differently. A lot of use of zadig.exe. Just having one wrong option on a run or debug configuration panel and no running of the ESP32 for me!
I have not said it before Andreas, but I look forward to : the Swiss accent, The little hand pointer, The hat and the knowledge You share. ThankYou Sir.
Thank you for your kind words!
Man, I love your existence Andreas. You have no idea how much you can help an undergrad mechatronics student understanding these electronic specifics for embedded development. One day I wish to be like you. Have so much knowledge in all the electronics areas of expertise.
Keep learning and you will become better than me ;-)
What a fantastic video! I've had some frustration with the basics on the S3 boards and whilst I don't have as many now, you have just answered many questions I had!
Glad to read that the video helped!
Can't wait to see your JTAG video :-) I've always been intrigued by it, I always thought it was some sort of standard programming port (as it seemed to me that's what it's mostly used for), but can't wait to hear you go into the details :-)
I already made a debugging video for PlatformIO…
@@AndreasSpiess Oh wow, if you mean #264 and #274 I haven't watched them, thanks for the info!
Your measured and clear descriptions make learning this much easier. Thank you for another useful lesson, it's appreciated!👍
You are welcome!
It not only can act as a storage device, but it is possible to programatically service block reads and writes. In theory, one can proxy it over the network into a file on some server for infinite space.
Would you like to provide a demonstration
I second that wish.
Anything I reply is getting auto-removed for some reason...
@@gabest4 TH-cam does not allow links anymore. Maybe you can post it that it does not look like a link to TH-cam but we will find it.
@@gabest4 Yatub sin sours more than any other site. Especially if it's socially important.
Thank you for confirming USB Host mode is not currently present. That was a real head-scratcher when I bought a couple of these a month ago and had to abandon a project.
Would have been great to have had this functionality from day 1, but glad I didn't waste my money, cheers!
It should be supported in one of the next releases…
It works in esp-idf, which is generally a much better way of using them anyway. ESP-idf even has the option to include arduino as a component so you can write code for it just as you would using the arduino ide but with the possibility of using esp-idf specific features too.
@@conorstewart2214 I tried using the ESP-IDF+VScode for the first time. It went reasonably smoothly but for the life of me I could get the "hid_example.c" to recognise when I inserted a USB device into either a female USB-A or USB-B micro breakout board.
Would love a video from Andreas to demystify this specific setup! ♥️
PS: I'd spotted the "Arduino.h" include before but didn't realise if was for people using the ESP-IDF, interesting!
@@AndreasSpiess
I've dug deep... - but didn't succeed in sending e.g. {0x77, 0xaa, 0x77} from my esp32-s3-zero to another USB device via standard USC C cable.
I have connected the 5V to the esp32-s3-zero - which also supplements the USB device - without any problems.
Before I shelve the whole project...
Do you have an example code I can use for the Arduino IDE to make this work?
And what settings do I need to have in the Arduino IDE?
As I wrote, USB host is not supported. For all other modes, you find example files in the Arduino IDE if you chose the S3 board
I knew about half of these -- thanks for the comprehensive examination. One of the things I learned was that the C3 had the CDC Mode -- I was, for some reason, thinking that it did not have any integrated USB functionality at all.
These usb functions were not well communicated, I think.
Nothing about the ESP32 is communicated well. Horrible reference materials and tools.
@@gavincurtisI do not agree. The datasheet has a lot of info. And Google knows even more because the chip is widely used.
GPIO0 the most important GPIO there is, hours of frustration can be solved by this pin! Thank you as always nice clear and to the point.
I agree!
I couldn't find any concise info on ESP32-S3 and this helped me a lot, thanks!
Glad it helped!
Thanks for the video. Please make more about esp32 features and such, especially the esp32-s3. What I love about your videos is the originality. Seems most utubers just copy one another... Waiting on your debug video mentioned here.
The debug video will come after my summer break…
Would you please make a video of the S3 showing what pins are optimized for:
I2C, SPI and I2S?
@@gavincurtis You should find this info in the datasheet. There are no "optimized", just possible pins
@@AndreasSpiess Thank you for the replies. So if I understand correctly, the high speed ports can now be switched to any pins using the I/O Matrix with the ESP32 S3 without issue?
I have a product design working great with the original ESP32 WROOM. MicroSD, SPI, I2S and I2C features are all being used.
The ESP32 WROOM we are using is now obsolete. So changing gear to update to ESP32 S3.
It also appears the serial loader bootstrap pins IO_0 and IO_2 have changed to IO_0 and IO_46 as well?
Again,
Thank you for your help.
Awesome video. Nice explanations. If I had known a few months ago I would have skipped WROOM-32 and got -S3 modules
They will be around for some time, I think…
Thank you for this video! I have been banging my head against the wall with an S2-mini board just to get serial print statements. The newer Arduino IDE and the "USB CDC on boot" parameter was the final hint that I needed.
Glad the video was helpful for you!
Thanks!
Thank you for your support!
Great video Andreas, very useful and informative 😊
Thank you!
Looking foreward to your hopefully next video on the JTAG aspect. Would be nice if real HW debugging would finally be possible!🎉
I also hope it will work as promised…
@@AndreasSpiess there is nothing promised and there are some nuances between the chips 😁 you will probably catch some of them while preparing the video. Work on openocd and dbg for newer chips is still ongoing, so expect things to get much better in the future.
Just a notation for everyone trying, for the first time the CDC On boot mode isn't enabled by default; so it must be enabled and any sketch should be uploaded over Serial then after that you will be able to upload over USB.
Thank you for the amazing video Andreas
Thank you for the addition!
Thanks! This was the final step in my prototype mini ffb wheel. I've got the device recognized as a 1 axis 0 button joystick and the rotary encoder drives the axis input.
As a tinkerer only, MAGIC.
Fantastic! It is always rewarding if it works.
Вы делали какую нибудь инструкцию? хотелось бы посмотреть, как вы это реализовали
@@Bondarev-Y Sorry not yet. I have run into problems with Windows drivers. It is very hard to get Windows to recognize a device as force feedback capable. I've tried hundreds of attempts but Windows doesn't play nice. If you are okay with only one way communications so that is the ESP32 acts as a controller, it is easy. For the ESP32 to be controlled by built in Windows drivers much harder. For now I have just simply recreated this design with 1 rotary encoder and 2 potentiometers. Soon I will add more controls. th-cam.com/video/7g6O4G1OXd4/w-d-xo.htmlsi=ztOf1aowJ5kJ0riX
--------
@Bondarev-Y К сожалению, пока нет. Я столкнулся с проблемами с драйверами Windows. Очень сложно заставить Windows распознать устройство как поддерживающее обратную связь. Я пробовал сотни раз, но Windows не идет навстречу. Если вам достаточно односторонней связи, где ESP32 выступает как контроллер, это легко. Но сделать так, чтобы ESP32 управлялся встроенными драйверами Windows, значительно сложнее. На данный момент я просто воссоздал эту конструкцию с одним энкодером и двумя потенциометрами. Вскоре добавлю больше элементов управления. th-cam.com/video/7g6O4G1OXd4/w-d-xo.htmlsi=ztOf1aowJ5kJ0riX
@@Curt-0001 There is an OpenFFB project, in it someone set up S2 and S3 for feedback. Perhaps this can help you
Thank you man with Swiss accent, what you explained solved many problems in my mind.
Glad to read that!
It's amazing how your videos have solved so many of my problems, Thank you Andreas
Great to hear!
Thank you for the very informative video! Would love to hear more about using the JTAG interface, particularly for debugging.
I hope I will be able to make this video in autumn.
A bit late watching this tutorial. Thank you, this is an excellent discussion of a topic not well covered in other videos.
Glad it was helpful!
I used the S3 chip in a window sensor design using a USB-C port for programming. So much more convenient than hooking up RS232, especially when they are already glued to the window frame.
Thank you for sharing your experience!
Hello! I am making a ESP32-S3 custom PCB. I want USB-C programming, can I just connect it to D+ and D- and then I can just program it, or is there anything else I need to think about in my design?
@@danielliden600 Take care of the correct CC1 and CC2 Resistors. Because the plug fits in both orientations, you need to bridge the pins for both sides on your pcb.
Think about power. USB can deliver your 5V, but you have to step it down or use an external source. For my application I rely on the battery for power and use only D+ and D-, but I have CC1 and CC2 designed to put resistors to ground. Not sure if I do this right, but at least it works for me.
Further I added pin headers for the old RS232 on the board as well as BOOT and EN buttons to be on the safe side, in case USB does not behave.
@@drstefankrank Thanks for response! From what I understand the ESP is 3.3V board, but the D- D+ is 5V. Do you have yo regulate it down to 3.3V before going to the ESP or is it safe to go directly to ESP?
@@danielliden600 The D- and D+ can be directly attached. Just the power that is delivered through USB is 5V and has to be stepped down to power the ESP if not powered differently.
I use a LiFePo4 to power it and for the one time programming I can use this or I use an external 3.3V supply while having it on the bench.
thank you so much Andreas, as usual. I just recently bought a pretty nice rotary encoder screen like the Nest thermostat with an embedded ESP32 S3, and I had no idea how to program it, but includes an addon board that exposes pins 1,2, 20 and 19 - I had no idea why they chose those pins to expose but it all makes sense now.
I hope you will now be successful with programming your board!
Great video, thank you. I'm only scratching the surface of ESP32 work, coming from the software world. So this went a little over my head. But I think I can see all kinds of fascinating possibilities.
You are welcome! For starters, an "old" ESP32 is probably best.
@@AndreasSpiess How would I identify an old one? Pre S3?
@@madwilliamflint The one without any -xx
Ich liebe Ihre Videos. Sie sind der Größte!!!
Danke!
@@AndreasSpiess Gerne, war ehrlich gemeint!
Sie werden sicher mit Anfragen und Kommentaren zugeschüttet. Darf ich Ihnen dennoch eine Frage stellen?....
Nachdem es mir dank Ihres Videos endlich gelungen ist, mein eigenes PCB mit einem ESP-32-S3-WROOM (N8R8) zu designen und bei JLCPCB fertigen zu lassen, stehe ich nun vor einem Rätsel, was mich schier zur Verzweiflung bringt.
Die Arduino IDE erkennt das Board und ich kann einen Sketch im CDC-Mode downloaden und nach Reset startet der Code auch und meine 4 LEDs auf meinem kleinen Board blinken wie gewünscht. Hurra! :)
Jetzt die schlechte Nachricht, der Code läuft nur, wenn das Board am USB-Port des PCs abgeschlossen ist. Verwende ich ein Steckernetzteil, geht nichts. Habe natürlich andere Netzteile und Kabel, Powerbanks, Direktanschluss von +5V am Spannungswandler mit einem leistungsfähigen Labornetzgerät versucht. Brachte alles keinen Erfolg, obwohl am ESP ganz saubere 3,3V anliegen. Das Board zieht 20 bis 40 mA, also nicht die Welt für den von mir verwendeten AMS1117-3.3 Spannungswandler.
Dagegen funktioniert das Board bei Anschluss an andere PCs oder auch an den USB-Port eines Notebooks im reinen Batteriemode immer auf Anhieb.
Habe auch schon versucht, IO19 und IO20 (USB_D- und USB_D+) mit einem 15k Pulldown in einen stabilen Zustand zu bringen, hat aber auch nichts gebracht.
Haben Sie eine Idee, was die Ursache sein könnte?
Verzweifelte Grüße ;)
Harald Raufer
@@haraldraufer6992 Remote debugging is hard. I would compare all pins of a board in working condition with one that does not work. There must be a difference. Look also at the serial pins. Maybe they show a brownout or so.
As mentioned in the comments, MCPWM using the Arduino IDE would be a cool video.
Another idea is the pulse counter, as that isn't simply available in the Arduino IDE but would be very useful.
Something to work on during your summer break! 😊
Yes! Pulsecounter please! I'm totally lost at the moment building something to print out the error code from my Motoronic 2.2 in a old BMW R1100r.
CDC mode actually works on the ESP32-S2 also
You mean "USBCDC" as how it is called in the Arduino code?
The one supported by the C3 is called HWCDC.
The S3 does support both. I prefer the HWCDC as it allows for easier flashing using the web flasher.
But the USBCDC does have some more nice features and the code feels slightly more mature compared to HWCDC.
Thanks for the info. I assume, CDC is part of the OTG block services.
@@TD-er use the esphome flasher instead of web flasher is way better and more reliable
@@TD-er HWCDC is realized in hardware, so the features are limited to only what is required for communication between the code and the hardware.
Good stuff. I'll have to remember to come back for a detailed review if I ever begin using ESP32 chips. 🙂
You miss something without using ESP32s ;-)
“I’ll have to remember…”
“Subscribe and you’re always in the front row” tm
*Had to "burn" that efuse (USB_PHY_SEL) to use native USB? I designed and built a custom board with an S3 and want to get the native USB part functioning so I can program it, as there isn't a USB to UART IC on the PCB. Thanks in advance for answering soon!*
I never heard of this eFuse. So you have to refer to the datasheet.
@@AndreasSpiess Thanks for answering. Seems it is an S3 thing to enable native USB in that MCU.
The most defining property of OTG is not worked out yet: the ability to function as a host.
That would open up a lot of interesting possibilities: we will be able to connect peripherals to the ESP.
I agree
They have examples for it in esp-idf.
Interesting, but I miss something. How does the ESP magically apply the settings from the Arduino IDE? Are they set when uploading a sketch / compiled into the sketch? If yes, can't you basically brick your dev-board if you accidentally upload something with legacy mode on a board that only exposes the USB pins for uploading in cdc mode?
Just make a few corrections to the board and you should be able to revert back. A circuit diagram and the data sheet, soldering iron and jobs a gooden
The settings are in the code. To „unbrick“ the chip, you always can apply GPIO0 as described.
Great video, thanks for sharing. Looking forward to the JTAG video
My pleasure!
As many of us use Platformio and VSC, could you describe how to set this up for CDC mode?
I second that - this would be very useful to the already great video.
Maybe you ask the PlatformIO guys. This is too specific for this channel.
framework = arduino
upload_protocol = esptool
monitor_port = COM8
build_flags = -D ARDUINO_USB_CDC_ON_BOOT=1
debug_tool = esp-builtin
debug_speed = 10000
build_type = release
in windows, you will have two devices when you connect the esp32 S3, one is for the com port the another one is for CDC, ensure to put the driver in the second device, make it right, because not you loose the com port, but that can be easy fixed. th-cam.com/video/b1VkJODi_4w/w-d-xo.html
Thanks a lot for your effort and investigations. USB Host will become very interesting because of the drivers. Maybe they implement generic drivers e.g. for an external keyboard or HDD?
We have to wait and see…
Wow, DANKE! genau das hat mir tage kopfzerbrechen bereitet - endlich mal super erklärt und auf den punkt gebracht!
Hat mir auch den Kopf zerbrochen. Deshalb das Video;-)
thanks it's works, i've had some frustration with the basics on the S3 boards (from indonesia)
Glad it works for you, too!
I couldn't get Serial.print() to work with my Lolin S3 Pro. I could program it, but just couldn't print to the serial monitor. After watching this video, I learned about CDC mode and by changing the "USB CDC on Boot:" to "Enabled", its all working!!!
Also, in the Arduino IDE, I couldn't get the "ESP32S3 Dev Module" board to work, but selecting the "Lolin S3 Pro" board worked just fine. There are obviously some differences between the two.
My next step is to get PlatformIO installed and use it as my primary IDE for projects. I've used it in the past, but need to install it on my new Linux machine. I like the Arduino IDE for simple projects, but like PlatformIO better due to its better layout and functionality. But its a bit more difficult getting started.
Thank you for your hard work making such videos!! 😃😃😃
I am sure you will enjoy PlatfgormIO. The -S3 should behave very similar there.
Nice, thanks Andreas! It would also be interesting to test bandwidth over the USB port.
I assume it will be different for different services.
thank you! would have needed this month ago 🙂
I noticed that if I have Serial statements in my code and no computer is connected the ESP has a strange delay.
Her this might help: Serial.setTxTimeoutMs(5); // set USB CDC Time TX
One other question: what would be a good way to get Serial statements in a deep sleep scenario? I had to start with a 5s delay for debugging, to have enough time to start serial monitor again (serial connection and port stop in deep sleep) Is there a serial monitor auto start option in the arduino IDE or VS/Platformio? Does someone know something usefull?
I included RX/TX pins on our PCB for debugging. I do not remember I had to wait for such a long time.
@@AndreasSpiess on one of my boards i just connected GPIO19/GPIO20 and i power the board also via usb, had to add this line, otherwise i had a slow start on powerbank (for sure more than 2sec)
I realized that there was a delay after serial.begin() and first i thougt i have to change the code to an other debugg log() mode...
It should be possible (maybe not with arduino ide) to tell when the usb is connected, so you wouldn’t need to wait for the serial to time out, just only print if the usb was connected at boot.
So if you use this feature you must forever manually press buttons to enter program mode?
Maybe it will change with different boards...
Very clear and informative video. Subbed!
Welcome aboard the channel!
Hi, I really need help. How to configure the esp32 s3 devkit firmware so that it is seen as a HID device in Windows or Android? I am making a converter that receives a signal from the touch controller of the HID over I2C display touch panel and must transmit these touches to a device connected via USB. I have success in that the touches are seen in the monitor of the arduino ide port, the coordinates of the touches are recognized, the pressing force of 2 fingers at once. But I can not make the ESP32S3 be seen as a HID panel and the touches are transmitted to the operating system. Do I understand correctly that after the firmware I need to connect the ESP32S3 through another USB port? (I have a version of the esp32s3 with two USB ports)
ESP32-C3 "download" or "Strapping pin" is not GPIO ZERO (anymore) - quite a change in the design - but GPIO 9
video description is with letter mistake - I am sure you wanted to say: "S2 C3 S3" ;-)
Yes, you are right. Thanks, title adjusted.
@@AndreasSpiess No, at this time it still keeps featuring "ESP32-S2, ESP32-S2, ESP32-S3"
Thanks a lot for the video. It was great. Cleared a tons of question.
Glad the video was helpful!
Hello, I'm a bit baffled. On Arduino IDE "USB Mode" doesn't show up on my ESP32 s2 chip. Is USB OTG enabled by deafault on the ESP32 s2 or is there a way I need to put it in OTG mode
Unfortunately, I cannot do remote debugging. It should work as described in the video and does not has to do with OTG.
Thanks for the great video Andreas. I have been looking for how to use ESP32 in host mode (I want to use it to convert the signals from a USB Joystick to CPPM for RC) but the information over there is very confusing. There are projects out there using simple arduinos and USB Shield but I wanted something smaller and more flexible to be able to add more functionality.
You still need a host shield for this release
Have a look at using the esp-idf, it has host mode examples.
when you select "usb mode" does it set the other usb settings to the correct ones, where do you get that graph in 8:32?
You have to set all settings independently and the table is made by me.
What is the name of the GUI program you used for viewing the serial connection @ 3:58 ?
MobaXterm
Do u know how to remove the name followed by the esp in cdc mode cuz i used a esp32s2 and it identified as a board called deneyap mini which is not true and it cause compilation to fail so i need to change it back every time or can i just disable the Arduino ide auto detect function back when we used good old ch340 there's no such problem
I never tried this. So I do not know
with usb ,,can i hook 2 or more usb device to esp32s3? like mouse,keyboard, and an rfid reader maybe
I think so, but I never tried.
Very Informative, thank you Andreas 🏴😁
You are welcome!
Hello,
can you help me with a case. I am very close to giving up until I saw your video. There is some hope in sight.
Target with Adafruit Metro esp32-s2 Board:
Keyboard/Mouse → are connected to the PC:
Board → is also connected to the PC (HID):
The board "monitors" inputs from the real mouse/keyboard (e.g. key A).
The board should react to these inputs by sending new simulated (programmed) inputs to the PC (e.g. for keyboard key A, board input to the PC: key B or a mouse click).
The programmed keys or mouse clicks from the board are not triggered by external keys, but exclusively by the hardware input of the mouse and keyboard connected to the PC.
If this implementation is not technically achievable with the Metro esp32-s2, which board is suitable for this case?
Your application seems to need a USB host and a USB slave. According to ChatGPT, the ESP32-S3 using the TinyUSB library can do something like that (switching between host and slave), but I have no clue if this works for your application.
@AndreasSpiess Thanks, Chatgpt information is not always clear to me. The information I get from gbpt: the esp32-s3 or the due are better compatible for such a project, but I could not understand exactly why. I think the main reason is the USB-OTG only mode you explained. It is a very important information that is not mentioned anywhere. Thanks for this research.
Well researched, very helpful. Thank you, Andreas,
My pleasure!
Great vid! Anybody else here hearing shades of Talking Moose in the accent? :)
Thank you, well presented and nicely composed informations. Are you planning to make a video about ZigBee support in C6 and H2 chips? Information seems pretty sparse at the moment regarding ZigBee in a maker context, I think it would really help getting into it...
So far I did not find any info for the Arduino IDE. And the power consumption of the Espressif chips so far we’re not ZigBee like…
I'm trying to use built-in JTAG function of ESP32S3, when I connect ESP32S3 to PC's USB, the device named "USB-Enhanced-SERIAL CH343 (COM8)", but not "USB JTAG/serial debug unit". How to solve this?
So far I did not try JTAG on the -S3. So I cannot help :-(
Good evening sir, could you help me, i am using this ESP32 wroom devkits' but sir problem is showing .. Failed with state -2Connecting to MQTT... How do i solve this problem...thank you
would be great to see another esp32 boards comparison this time for the s3 model
Maybe stuff for another video...
Can't wait till you get hands on some C6s herr Spiess. Nice video cheers!
My problem is not the C6 HW, it is its Arduino IDE support…
And Matter also seems to move quite slowly. So we will see where and when we can use the C6
Did you choose the Arduino framework over ESP-IDF for any specific reason? ESP-IDF seems to be a more optimized and richer solution (not all available functions in esp-idf are immediately available in the Arduino framework). Thanks in advance for your answer.
I chose Arduino because it supports other chips as well as it is accepted in the Maker community and has lots of projects and libraries available.
Hi Andreas. I have been in the front row for a couple of years so far. As a retired Engineer, I have been playing with ESP32S dev boards and using PlatformIO as my IDE. I was excited by your S3 video and immediately went to Amazon to look for a board that might be easier to debug with. Then got confused. Many of the S3 boards have a USB to serial chip for the 2nd USB port. Some don't. I am guessing that the USB to serial IC is there to "comfort" legacy users? The boards containing 2 USB ports but no USB chip must use the two ports you discussed in the video.
I an thinking that the USB chip boards would suffer the same fate of older ESP32 needing the RESET/GPIO0 buttons. And the boards using the two ESP32-S3 ports would debug more reliably.
Always enjoy your vids....
Any thoughts?
As you suggest: The USB to serial chip is a „comfort“ function and ok for a development board. For a productive board, I would only add a jumper for RX/TX.
I'm using both C3 SuperMini and S3 Zero, and finally more libraries and board files are slowly being made available. On the S3 Zero, I'm seeing segmentation error: Core dump write failed with error=-1 .. is this because partition or corupt bootloader ?
I do not know the reason :-(
Very useful video, sir. Thank you.
You are welcome!
What a coincidence... I've been working on exactly this for the last 2 weeks. (complete rewrite of my ESPEasySerial wrapper to have a single interface to any possible serial port)
One thing to keep in mind for the S3/C3; There is a bug in the Arduino code, which renders the serial port unusable when calling end(). (will be fixed in the next ESP32 Arduino release)
Another nice thing from the CDC uart ports is that the host (PC) determines the baudrate, so it doesn't matter which baudrate you set in your terminal program to connec to the ESP.
Thank you for the additional information!
Hi. Thanks for the video!! I am working on a project about sniffing data froma a meteorological station (Oregon WMR300) via USB, and Im not sure how to do it using a esp32 S3. I am thinking about using the CDC mode but im a bit lost in this.
I assume you will need to search for an example to emulate a USB host.
I bought an ESP32-C on board some time ago.
Because I couldn't load a program, I got myself an ordinary ESP32 with serial IC
since then I've avoided the ESP32-C and ESP32-S
Some boards have both, USB and a Serial chip. I like those boards best!
Hi Andreas - is it possible to contact you regarding some consultancy work? I'm looking to get an ESP32S3 talking to another device. Just sending commands to the peripheral's CDC and getting some text responses. I've achieved this using a USB Max Host board, but would like to use the d+ d- pins and the Arduino IDE.
TH-cam is only my hobby. So I have no time for consulting :-(
@@AndreasSpiess no worries. Love your hobby! Thanks for the reply
What about the 5th mode where you use both device and host at the same time with an external USB phy?
It uses the JTAG pads but no prob as this is exposed over USB anyway…
I do not understand :-(
Hello there and thank you very much for this video. I am very new to esp32 and absorbing every information I can get. Sorry for maybe a noob question but does running in CDC mode also mean I can still send serial data from esp32 over usb to the computer (like temperature value of temperature sensor) but do not need to install a driver anymore in Windows 10 like when using cp2102 or ch340 ?
This question is not easy to answer. It depends on the protocol you use. For USB, you always need a driver, but often, they are included as a standard.
Thanks for all your great videos Andreas, any chance you could make one about debugging an ESP32-S3 using Arduino IDE 2.x ?
Last time I tried it was not stable enough for a video ☹️
I wonder whether a USB HID device can receive data from the PC.
Why not?
Very very useful!...i keep learning with your channel....a question for you, what about xh-c2x esp8684h4 ?, i can`t work with arduino ide, i can`t find the right board, this module is part of esp32-c2 family.
So far I did not see support if the Arduino IDE for the -C2
@@AndreasSpiess I started to work with circuitpython and thonny for c2 family, regards!.
Thank you for this video! Can you help me with one moment? I try connect USB device to ESP32-S2 and send some byte to this device. Am I must use CDC mode? And how to connect USB to ESP32 board? D+ to GPIO 20 and D- to GPIO 19? And how to send hex array to USB device? Thanks!
D19/20 are the same for the S2. Use the Serial connection as described in my video (via USB) to transfer Hex data
Can I use qty 1. ESP32 to use soil,moisture sensor and control qty 1 water pump?
I mau do that if possible because I plant in single containers.
Please advise. Also water pump power/size varies in size . How do I address correct power to pump?
Thank you and god bless! Alton.
Unfortunately, your questions are too long to answer in a short comment. You have to ask google and find a similar project for reference.
Hello Andreas, could i use the USB(UART0) as serial output and the OTG for JTAG ?
could you maybe do a video how we could put a external flash? i thought about using a external flash IC for data logging and using the OTG for quick acces to the csv files for data analysis.
thanks in advance.
1. I do not know. You have to try
2. Because I have WiFi on hte chip, I longime ago stopped recording data on the device itself. I transmit it into a database on a server. So I never had the need for logging on the device.
@@AndreasSpiess Thank you for your answer, for now i will stick to the SD-Card then. :P
Thanks for your sharing!!! It is very clear. But I met a problem that the window10 device management recognized an unknow USB device. I am not sure that the problem is caused by windows driver or the layout of the PCB or the hardfirm of the ESP32-S3. I use the ESP-IDF on VS code to develop it. I want to ask that when I get a totally new ESP32-S3 that never download any code by me, when I connect it via USB port, could the windows 10 recognize the USB port directly? Thank you very much!
Unfortunately, I cannot do remote debugging. Here, the ESP32-S3 is recognized by my PC. If you bought a regular board, the chance that the board is not working is slight. If you have a custom-built one, check first with a standard one.
Maybe your PC does not have the correct driver installed.
@@AndreasSpiess Thank you very much for your reply! It is very kind of you. I have tried the official board and confirmed that the driver was installed. So I am not sure that if I should download a specific firmware to enable the USB port. Anyway, Thanks again. and welcome to China. I want to take you to try much delicious food. 😁
I would like add to an ESP32 based internet radio the capability to play mp3 files from an USB stick, do I need USB OTG?
I assume you need host mode to read an USB stick (not supported yet in the Arduino IDE). But you find good internet radio projects with MP3 capabilities
Regarding how the dual-core ESP32-S3 (USB OTG + USB Serial/JTAG) has the combined features of the ESP32-S2 (single LX7, no Bluetooth, JTAG, USB OTG) and the ESP32-C3 (Risc-V, BLE 5, USB Serial/JTAG)..
any plans to do a video on how to setup VSCode to debug an ESP32 using an external usb jtag debugger (ex. ESP-Prog)? I've found some older information, but it no longer works with the current IDF and VSCode plugins.
I do not cover the IDF on this channel, only the Arduino IDE.
th-cam.com/video/b1VkJODi_4w/w-d-xo.html
What about USB host functionality? Connecting keyboards TO the ESP32?
Should work. I even made a video about it (with the ESP32-S2)
the settings from my esp32s2 mini looks very diffrent and for the s2 dev too there i can´t find your settings
I just checked: The "ESP32S2 Dev Module" has very similar settings. The supplier decides which settings he includes.
Great video👍
I issue on my side. I connected my esp32-s2 with directly to usb while holding the GPIO0
Hear the sound usb connected
Can see unknown device
But can not load drivers for the com port. Nor even could find suitable driver for esp32 usb port driver.
Could you please help how to do serial port driver.
Thanks
The ESP32 does not need drivers. Just your PC need drivers.
I've successfully built custom usb keyboard using ESP32-S2. And then want to add BLE features, so I changed the schematic and using ESP32-S3-FN8 (8MB internal flash). It works as expected, the board detected as HID device when usb plugged in and it can connect wireless via BLE. But when I changed to ESP32-S3-FH4R2 (4MB flash 2MB PSRAM), the code successfully uploaded, but it totally not works. My computer cannot detect it as HID device. Can't understand what caused this. Both have same footprints, and no changes to the schematic. Just wondering if someone has encountered this problem and found a solution.
Strange. Maybe an error in the compiler?
HEY!
Can I configure the esp32-s3 to operate as if it were a CarLink?
To connect your cell phone to the car stereo via Wi-Fi.
I do not know :-(
Hello Andreas Spiess I really appreciate your work - I have not the capabillity, to think into a problem I have. But maybe it would be possible. I just write it now : I want to connect driverless a Multitouchdisplay with a Notebook - so on the multi touch needs to be a host, and on the Notebook a HID Device - In between a porperatery or open source protocol which is NOT Wifi infrastructure mode - maybe over wifi or an Ad Hoc conenction. Now the question do you think this is possible with Arduino or these ESP32 when i find out how the host has to speak with the multitouch display. I really would have an answer before I start making it, and lose a lot of time learning it would not have been possible from the start. [Display] - - [ESP USB Host] ~ ~ wireless ~ ~ [ESP Touch Emulator HID Device] - - - [Notebook/PC] Ich habe auf Englisch geschrieben, damit die Community es auch lesen kann) Schöne Grüße, Pascal
This is a complex project, and I do not know if it is possible. Particularly important is to check the speeds you need to drive the screen. And then if it is worth investing all the time. It will be a long project.
I love the guy with the Swiss accent 😊
:-)
Haven't found a case where I "need" and S3 yet. The original seems fine and I like the classic bluetooth.
I use the chip modules and an FTDI to upload new sketches, which so far hasn't really been an issue.
That is why I like choice!
Interesante, se puede hacer transferencia de datos por espNow, q en un lado este el esp conectado a la computadora y a distancia otro esp conectado a un mause?
Este vídeo no trata sobre ESP-Now. Hay otros videos sobre este tema.
Will you make a video about esp32-c6 with zigbee and how to program it using arduino ide?
When it will be supported: Yes.
Great video as always! But I have a strange behaviour on esp33-c3 in cdc mode.
I have an application that sends can-bus messages on the internal team-hardware.
I can download the app and see all serial.print() via the usb-cable, BUT, when I pull the usb-cable the app slows down the sending of can-messages. It seems as if the loop is hanging on the serial.print() statements about a sec and the times out and send a message, then hangs and so on.
If I restore the cable and resets it works again.
So there seem to be an issue when the usb-cable is removed that affects the functionality of the code.
Any ideas?
Unfortunately, no :-(
I replaced Serial.print() with esp-idf logging and the problem disappeared
I've given up on using Serial for communication with the ESP32. You need to have the ESP32 tethered to a computer, the Arduino IDE terminal isn't the best, and PuTTY is a pain to use. I use BluetoothSerial instead, it's part of the Arduino ESP32 package, and requires very little change to code. I use an app called Serial Bluetooth Terminal on my Android phone, I believe that a similar app is available for IOS.
A good idea!
Thank a lot for this userfull video for my next pcb design Can you give me an advise if i am right
i can program in arduino ide by usb direct on port pin 19/20 in CDC mode ("do i keep serial debug on my computer in this mode") and connect my gps on port pin 36 37 normal serial?
I do not remember the details. I thought I mentioned using USB and in addition one of the native UART ports.
So do i understand correctly that if i get bare esp32 s3 wroom chip and connect the pins 19, 20 i can just program it? Or does something have to be flashed there using the USB-UART converter? Thank you for reply, Im not completely sure...
Yes, you can flash it using the built-in USB module as shown in the video.
@@AndreasSpiess Okay thank you, I wasn't sure if the feature didn't need to be enabled in previous upload :)
Hi , i want to connect the mpu 6050 pins (sda , scl , AD0, int )to esp32c3 . Do you know how i could connect to itr ?
I assume you find the I2C pins in the datasheet of the ESP32-C3 and the ADO in the library (if needed)
@@AndreasSpiess Hi do you know the maximum current consumption when it is in active mode(Bluetooth active to trasnfer data) ?
@@alenninan5524 Also here you can consult the datasheet for details. Other ESP32s consume very short peaks of up to 400mA.
Curious why you still use the arduino IDE as opposed to VS-Code? Is there a deficiency in VS-Code or is it just user preference?
If you refer to PlatformIO, you still use the whole Arduino IDE framework,btw. If you use the Espressif IDF, you loose the possibility to program other chips.
I use the Arduino IDE on this channel because it is simple and because people who use PIO can easily convert my projects because they have advanced skills. The reverse direction is not possible for a beginner.
would love a video Back to basics.
All you showed with an pratical exemple.
Maybe I will use the -S3 in a future project...
Anyway to output ethernet through usb? What about attaching a USB to ethernet adapter into the port. Is it gonna work ?
I do not know :-(
If I no longer have to dig out my ESP-Prog to debug that's great! Going to have to learn OpenOCD next...
Should not be too complicated…
Thanks for this video. I wish espressif would explain this topic better. I play with the ESP32 and the ESP32-C3 using the espressif IDF (eclipse etc). I have pages of confusing notes about the upload working then not working, debugger work or not working, com ports come and go. It seemed once I figured something out - on my next project a couple months later things worked differently. A lot of use of zadig.exe. Just having one wrong option on a run or debug configuration panel and no running of the ESP32 for me!
I hope this video helped a bit to remove confusion. I agree that Espressif should have done it.
Hallo Andreas! Danke für das Video. Weisst du auch ob das ganze via PlatformIo mit dem richtigen config funktioniert?
Sollte gehen. Ich habe es allerdings nicht probiert.