Тёмный

#407 

Andreas Spiess
Подписаться 479 тыс.
Просмотров 141 тыс.
50% 1

Up till now, emulating a keyboard or a mouse was only possible with an Arduino Micro or a USB host shield. With the new Arduino support for the ESP32-S2 I will show you how it can be done with our darling. In addition, we will add Wi-Fi to create remote logging to Excel or other PC software. If you have evil thoughts, you can also use it as a wireless “rubber ducky” to hack other PCs or play a trick with your colleagues. As a bonus, we will deepen our knowledge of how USB works.
I am a proud Patreon of @GreatScott!, @ElectroBOOM , @Electronoobs , @EEVblog , and others. No Docker, No Microsoft Teams, Zoom
Links:
FeatherS2: amzn.to/3BV6uWJ
TinyS2: amzn.to/3BQ96Fm
ESP32-S2: s.click.aliexp... or amzn.to/3ETmQkz
Arduino Pro Micro Clone: s.click.aliexp... or amzn.to/3CSm1rU
Github: github.com/Sen...
The links above usually are affiliate links that support the channel (no additional cost for you).
Supporting Material and Blog Page: www.sensorsiot.org
Github: www.github.com...
My Patreon Page: / andreasspiess
Discord: / discord
If you want to support the channel, please use the links below to start your shopping. No additional charges for you, but I get a commission of your purchases to buy new stuff for the channel
My Amazon.com shop: www.amazon.com...
For Banggood bit.ly/2jAQEf4
For AliExpress: bit.ly/2B0yTLL
For Amazon.de: amzn.to/2r0ZCYI
For Amazon UK: amzn.to/2mxBaJf
For ebay.com: ebay.to/2DuYXBp
www.facebook.c...
/ spiessa
www.instructab...
Please do not try to email me. This communication channel is reserved for my primary job
As an Amazon Associate, I earn from qualifying purchases
#no#midroll#ads

Наука

Опубликовано:

 

19 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 386   
@louiscelenza8017
@louiscelenza8017 2 года назад
Regarding the CONFUSING pin numbers: It's better not get frustrated, just stay calm and continue. By FAR, this is one of the #1 lessons I have learned from you Andreas Spiess. Thank you.
@AndreasSpiess
@AndreasSpiess 2 года назад
:-)) Thank you!
@IamTheHolypumpkin
@IamTheHolypumpkin 2 года назад
Comes right around the perfect time, I want to make a Kerbal-Space-Program Keyboard as an Xmas present for my brother. It's like your reading my mind :D
@vl4dl3n
@vl4dl3n 2 года назад
Whole Keyboard o_O
@AndreasSpiess
@AndreasSpiess 2 года назад
Cool gift. You are a good brother!
2 года назад
I must thank you, so so much! Ironically, your thumbnail is showing a keyboard i was waiting from Logitech for a few years already! What an irony... now i can sit in a first row and keep lights off :)
@AndreasSpiess
@AndreasSpiess 2 года назад
Very good! Illuminated keyboards are coo!
@wm6h
@wm6h 2 года назад
Thank you Andreas. I’ve used that JTAG block in the ESP32-C3 @ 3:53. Allows JTAG debugging in VSCode, using the USB data mode-without a JTAG probe. Uses a risc-v debug standard. Used the ESP32-C3 dev module hardware.
@AndreasSpiess
@AndreasSpiess 2 года назад
Thank you for the information. So far I only debugged the original ESP32 using PIO and it worked ok, too.
@viniciusnoyoutube
@viniciusnoyoutube 2 года назад
A basic ESP32 can be a HID through Bluetooth. Even better than use a USB cable and you can use it on a phone or tablet.
@RicardoRibeiro-dorcari
@RicardoRibeiro-dorcari 2 года назад
Try that on your run-of-the-mill pc, it won't have Bluetooth, so this is valid as well. I just wished this had Bluetooth as well to be the best of both worlds.
@viniciusnoyoutube
@viniciusnoyoutube 2 года назад
@@RicardoRibeiro-dorcari USB dongle.
@RicardoRibeiro-dorcari
@RicardoRibeiro-dorcari 2 года назад
@@viniciusnoyoutube sure, but why do it if you can connect with usb and get power at the same time. There are use cases for everything so both approaches have their merit.
@viniciusnoyoutube
@viniciusnoyoutube 2 года назад
​@@RicardoRibeiro-dorcari Who says otherwise?
@adlerweb
@adlerweb 2 года назад
@@viniciusnoyoutube ...if they work. I've got a sh*tton of different USB BT Dongles and none of them works with all devices.
@smokeysky
@smokeysky 8 месяцев назад
LoL... was trying to get all the information together to make something like this... here it is, all in one video! Much love.
@AndreasSpiess
@AndreasSpiess 8 месяцев назад
Glad it was helpful!
@Taran72
@Taran72 2 года назад
As always, the video was very interesting! I follow your channel to stay updated with the latest technologies and to find inspiration for future projects. Great work! Thank you. :)
@AndreasSpiess
@AndreasSpiess 2 года назад
You are welcome! I am also interested in those topics. This is why I still like to create those videos.
@mrnevermind
@mrnevermind 11 месяцев назад
Sir I have recently found love in electronic trying to build a custom keyboard. Your video cleared up so many questions thank you
@AndreasSpiess
@AndreasSpiess 11 месяцев назад
You are welcome!
@mikegofton1
@mikegofton1 2 года назад
Thanks Andreas for your explanation of the HID requirement for Keyboard emulation.
@AndreasSpiess
@AndreasSpiess 2 года назад
You are welcome!
@AntonioDellaRovere
@AntonioDellaRovere 2 года назад
It's been a long time since I tinkered with USB, but I think you can have both HID and CDC configured. They will then both enumerate and show up as 2 USB devices..
@AndreasSpiess
@AndreasSpiess 2 года назад
I think you ae right.
@wei48221
@wei48221 2 года назад
Awesome as always. Thank you for the effort.
@AndreasSpiess
@AndreasSpiess 2 года назад
You are welcome. It took a long time till the software support for this chip was available (for the Arduino IDE)
@MrPizzapeter
@MrPizzapeter 2 года назад
General remark: Das USKA Seminar Antennensimulation vom 13.11.2021 hat mir gezeigt, wie schwierig es ist derartige Themen darzustellen. Umso mehr bin ich begeistert von der Qualität Deiner Videos, simply outstanding, out of this world.
@AndreasSpiess
@AndreasSpiess 2 года назад
Danke und: Ja. Einfache Videos sind nicht einfach in der Herstellung und brauchen Zeit. Wenn dich Antennen interessieren empfehle ich mein VNA Video. Oder das SDR Grundlagenvideo sei auch gut sagen die Zuschauer;-)
@PhG1961
@PhG1961 2 года назад
Evil thoughts... not really, but playing a few tricks on colleagues... defenately. Great video and USB overview.
@enzanto
@enzanto 2 года назад
Post e message on screen. With notepad or terminal. "this is a ransomeware put your hands in the air where I can see them"
@AndreasSpiess
@AndreasSpiess 2 года назад
I see both of you have a lot of ideas :-)
@PhG1961
@PhG1961 2 года назад
@@AndreasSpiess Indeed, lot's of ideas, but so little time (and money)...
@nmidu
@nmidu Год назад
I love u andreas! You are the rockstar of the microcontroller. This video help me a lot. Big hug from argentina amigo!
@AndreasSpiess
@AndreasSpiess Год назад
Thank you for your kind words!
@GilgaFrank
@GilgaFrank 2 года назад
Another great useful video. Thanks Andreas for diving deep into the ESP32 and saving us so much head scratching.
@AndreasSpiess
@AndreasSpiess 2 года назад
You are welcome! This is the goal of this channel ;-)
@seanchallenge
@seanchallenge 2 года назад
Excellent job 👏thank you Andreas always interesting technology to learn and discover. Suggestion any Pi Pico projects with USB HID. Cw or Wspr beacons thanks again
@AndreasSpiess
@AndreasSpiess 2 года назад
So far I do not see that the Pico has got a lot of traction in the Maker community... But it for sure could be used for that purpose. I do not see where USB would be of benefit for beacons :-(
@bastiannenke9613
@bastiannenke9613 2 года назад
11:49 so, it could be theoretically possible to make something that downloads a file (maybe from the Synology?) and make it available for example to a 3d Printer without network capability? Sound like another thing for the Endless list of projects.
@bastiannenke9613
@bastiannenke9613 2 года назад
@@ruakij6452 Octoprint is currently not supporting SLA (resin) Printers unfortunately. Nanodlp might work, would have to look into that. But a usb dongle that can connect to a NAS and let it automatically download from a certain directory could be neat for other stuff too.
@Haldi4803
@Haldi4803 2 года назад
Or even Cooler, the Other way around! Plug the USB Stick into the PC/Machine/Device and put your files on it. always connected to the WiFi AP/Hotspot. And make them available to other computers/servers. Because this "Sandisk WiFi USB Stick" or all other stupid USB Disk with WiFi cannot use USB mode and WiFi at the same time.
@TheDThought
@TheDThought 2 года назад
This might be possible in theory, but the throughput of the USB OTG interface is limited to USB1.1-FS - that's 12MBit/sec. (USB2 is 480MBit/s) Using it as mass storage might be limited by that...
@SuperBootyBay
@SuperBootyBay 2 года назад
@@bastiannenke9613 I'd imagine octoprint would support a laser based SLA though? Since you can still convert standard G-code with the correct firmware. (Here's hoping because my janky DIY SLA needs some luck)
@bastiannenke9613
@bastiannenke9613 2 года назад
@@SuperBootyBay my resin printer doesn't use g code, I't has a picture for every layer. Which is as far as I currently know not supported.
@zyghom
@zyghom 2 года назад
Super nice Andreas - as usual. I prefer S2 over S for all my sensors (however S2 bare is a bit longer than S bare - I don't use dev boards at all - too big for real application). Also S2 has lower power consumption both while working and while sleeping. Since I don't use BT I am not missing anything. And I love Arduino version 2 (although still beta) ;-)
@AndreasSpiess
@AndreasSpiess 2 года назад
I use version 2 of the IDE from time-to-time to check it out. It still takes a long time for startup which I do not like for my small projects...
@zyghom
@zyghom 2 года назад
@@AndreasSpiess you are right, but once it's started, everything after is a pleasure ;-) Especially that the serial monitor is built in ;-)
@hydrogilbicacid
@hydrogilbicacid Год назад
😊
@adrianscarlett
@adrianscarlett 2 года назад
I bought a pile of attiny85 chips some years back as they support v-usb, great for adding a few external switches to a PC via USB and really cheap
@AndreasSpiess
@AndreasSpiess 2 года назад
Good idea. I love the ATTiny85! But it has a very limited number of pins. If you use 2 for USB you do not have a lot left to connect switches etc...
@wdoe3187
@wdoe3187 2 года назад
@@AndreasSpiess Just a note that v-usb works with any Atmel MCU. It is just software emulated USB. It only does the slower USB 1.1, but that is what keyboards and mice use, so perfect. In some ways, it is superior to hardware, because it is inexpensive, and you have complete software control over everything. Also, it doesn't consume a serial port, leaving the serial port free for other things.
@avejst
@avejst 2 года назад
Great update video as always Thanks for sharing your experiences with all of us :-)
@AndreasSpiess
@AndreasSpiess 2 года назад
My pleasure!
@foznook
@foznook 2 года назад
gorgeous job was done here! thank you!!
@AndreasSpiess
@AndreasSpiess 2 года назад
You are welcome!
@rklauco
@rklauco 2 года назад
OBS controller with wifi ui to create new combinations of keyboard shortcuts! Idea is born :)
@AndreasSpiess
@AndreasSpiess 2 года назад
Good idea. So far I only did some experimenting with OBS (because I do not do live streams)...
@fahnleindieselschweif5022
@fahnleindieselschweif5022 2 года назад
The Leonardo is able to emulate a HID.
@chahilpatel2993
@chahilpatel2993 2 года назад
Leonardo is same as atmega32 or Arduino Micro
@Mr.Leeroy
@Mr.Leeroy 2 года назад
and it has native USB peripheral
@AndreasSpiess
@AndreasSpiess 2 года назад
You are right.
@jamess1787
@jamess1787 2 года назад
Once upon a time I wired an Ethernet extension by splicing into the USB cable of a low res webcam (0.8 or 1.2MP, don't recall). It worked great, was able to watch the webcam from 50' away and catch thieves picking their nose while going through/messing up/stealing from my workstation. USB 1.1 != USB 2.0
@AndreasSpiess
@AndreasSpiess 2 года назад
I did not check the limit of USB1.1. It seems it was more robust (maybe because it was slower than USB2.0)
@deviteam5515
@deviteam5515 2 года назад
So great as always ! Thank you for everything, I do learn lot of things from you ! Thank you so much !
@AndreasSpiess
@AndreasSpiess 2 года назад
Happy to hear that! You are welcome.
@CarstenSchultzDe
@CarstenSchultzDe 2 года назад
My idea is to build a keyboard converter between Mac and Windows which send C to my Windows when I use the Mac shortcut.
@DoctorWhom
@DoctorWhom 2 года назад
is STGR the key on the bottom left? I now want a STGR keycap for my keyboard. :D For other people: is what german keyboard says for
@CarstenSchultzDe
@CarstenSchultzDe 2 года назад
@@DoctorWhom yes I mean this key. As a Mac user I often press COMMAND key which is Windows or ALT GR key for Windows when using remote desktop.
@DoctorWhom
@DoctorWhom 2 года назад
6:34 good use of the word crap :D
@AndreasSpiess
@AndreasSpiess 2 года назад
:-)
@philr4665
@philr4665 2 года назад
Balanced audio cables (typically XLR) used a similar EMI reduction technique. Very simple but very clever.
@talideon
@talideon 2 года назад
They can do, but differential signalling (what USB does) isn't the same thing as balanced signalling. The former has a single signal transmitted down two conductors, with one being of opposite polarity, whereas balanced signalling has two conductors with _equal impedance_ to ground, one of which carries the signal, and the other being possibly 0V. You can use both together, but they're different. With balanced signalling, you subtract the noise line from the signal line to get a clean unbalanced system, which is possible as they're of the same impedance, whereas with differential signalling, you invert one of the signals and average them. Differential signalling helps eliminate things like crosstalk, whereas balanced signalling is more about noise reduction though the elimination of common-mode interference.
@AndreasSpiess
@AndreasSpiess 2 года назад
@Keith: Thank you for your deep insight!
@eduardograterol6829
@eduardograterol6829 2 года назад
Greatings Andreas from Venezuela. I will try later when i get my new esp32 in a few days.almost christmas for me. Byeee
@AndreasSpiess
@AndreasSpiess 2 года назад
Enjoy!
@scharkalvin
@scharkalvin 2 года назад
The same 'differential' two wire signalling is also used in RS432 and RS485 serial connections.
@AndreasSpiess
@AndreasSpiess 2 года назад
You are right. This is a widely used principle.
@NikolaiVarankine
@NikolaiVarankine 2 года назад
Thanks, Andreas! I think a very needed application of USB keyboard for ESP32-S2 is a convenient way to supply user/pass pairs to the MCU (for Wi-Fi, etc.), instead of hard coding them in C/C++ files. For home project it's good, but for industrial it isn't. Passswords can change on a regular basis. A board, that holds a chip, can have a service pins to attach a standard USB-A connector. That, in turn, connects to USB keyboard. A LCD screen for key echo is optional.
@AndreasSpiess
@AndreasSpiess 2 года назад
In my lab I use a password manager for the purpose of filling in different passwords. So I would not need an external device. But you are right, in other environments where such managers are not allowed it would be handy. You could create a database with the different passwords and call this database before you enter the credentials automatically...
@errrick
@errrick 2 года назад
Andreas ! love your videos, been a fan for years now. I would just like to point out, maybe for clarification in the beginning of the video, that you are specifically talking about USB keyboards - since you can still make ESP32 based Bluetooth keyboards without issue and people may get confused !
@AndreasSpiess
@AndreasSpiess 2 года назад
I thought this was clear in the title ;-) But pay attention: The -S2 does not offer Bluetooth.
@errrick
@errrick 2 года назад
@@AndreasSpiess I had no idea! thanks for the clarification.
@Ownedyou
@Ownedyou 2 года назад
Great video as always! Any plans to play around with C3's coded phy long range mode? Almost LoRa range, convenient BLE functionality and very reasonable power seems almost too good to be true...
@AndreasSpiess
@AndreasSpiess 2 года назад
I already did a video about the Long Range mode of the ESP32. It is not comparable with LoRa at all.
@EmmanuelLieurain
@EmmanuelLieurain 2 года назад
Very interesting, thanks!
@AndreasSpiess
@AndreasSpiess 2 года назад
Glad you liked it! As you saw I also learned a few things in this video ;-)
@kjyhh
@kjyhh 2 года назад
Good to know! Wonderful USB noice cancelation explaining!
@AndreasSpiess
@AndreasSpiess 2 года назад
Thank you!
@stmohir
@stmohir 2 года назад
Thank you, would be great if you could show how to work with the TTGO version as well, how to use the screen and the dip switches. Thanks again
@AndreasSpiess
@AndreasSpiess 2 года назад
This is probably too specific. If you look at the diagram you see that they use the ST7789 display (there is a library available) and one dip switch is to change the USB connector to between the USB-to-Serial chip and the ESP (GPIO19/20). The second dip switch is for the XTAL pins. I do not understand the purpose and did not find documentation :-(
@stmohir
@stmohir 2 года назад
@@AndreasSpiess Thank you for your reply, in the product description, it says ST77789. But I tried with ST7789 and did not manage yet. Will keep trying :)
@dexter323i
@dexter323i 2 года назад
Thank you Andreas, this is the topic I am also after! It is good to know they have added these libraries to Arduino. Before this, only ESP-IDF had it, and it is a terrible mess for me who has got used to Arduino framework. The next step would be USB OTG. Use the ESP32S2 to READ USB devices. (Mouse, keyboard, PS controller, etc.) Is it possible? I have read the ESP also has this functionality, but cannot find any example code of it. :(
@AndreasSpiess
@AndreasSpiess 2 года назад
Then you need the real "host" library. But I do not know if it exists (was ported) for the -S2
@ficeto
@ficeto 2 года назад
You can also try "USB Firmware MSC on Boot", which will add a new MSC drive which gives you access to the running firmware bin and allow you to upload a new firmware (requires partitions with OTA)
@AndreasSpiess
@AndreasSpiess 2 года назад
Thank you for the info!
@MakersMashup
@MakersMashup 2 года назад
2:23 I'm surprised you didn't mention the Teensy. It's supported this in the 4.1 board. The code implementation could use some better examples. I just picked up a Feather S2 to do the same thing. I'll have to give this one a go too.
@AndreasSpiess
@AndreasSpiess 2 года назад
You are right, the Teensy's and many other STM32 boards offer native USB. A big Teensy is probably an overkill for most of those projects...
@MakersMashup
@MakersMashup 2 года назад
@@AndreasSpiess Agreed. Teensy is overkill for a lot of small IOT projects plus it lacks the wifi. Like you I was pretty excited to see the host mode on the device. As more of these are produced the cost will go down and I'm really looking forward to the S2 when its in the sub $10 range like the ESP32's.
2 года назад
Wow, the ESP chips are so versitile! There are much more capabilities than I have time to play with them
@AndreasSpiess
@AndreasSpiess 2 года назад
Agreed. Still good to know if we need it...
@michaegi4717
@michaegi4717 2 года назад
Thank you for this video. It's so sad that the Teensy-Boards don't come with wifi. I really like the keaboard and joystick capablilities of Teensy-boards.
@AndreasSpiess
@AndreasSpiess 2 года назад
This is why we all love the ESPs: They have Wi-Fi. It took other manufacturers a long time to understand and follow. This is why Espressif became so big... But the Teensies have their areas where they are good.
@MatsK007
@MatsK007 2 года назад
The Arduino family has two boards that can emulate USB, Arduino Leonardo and Arduino Micro and both is using the MCU ATmega32U4. So its the ATmega32U4 that is the enabler for USB host functionality.
@AndreasSpiess
@AndreasSpiess 2 года назад
You are right. The Leonardo is more-or-less the same as the Pro Micro. Just bigger (and more expensive). The Due, BTW, also supported native USB.
@MatsK007
@MatsK007 2 года назад
@@AndreasSpiess Ok, I haven't played around with that one, but then we can add the ATtiny (ex Digispark) family as well ;-) And I must say THX for all your inspiring Videos.
@AndreasSpiess
@AndreasSpiess 2 года назад
I would put the ATTINY in a different category because it uses bitbanging and has no native USB...
@MatsK007
@MatsK007 2 года назад
@@AndreasSpiess Agree
@ericblenner-hassett3945
@ericblenner-hassett3945 2 года назад
Interesting and I agree with the comment around 6 minuit mark, altho it can be hard to stay calm when the ' official ' PDF uses a 4th numbering system ( the actual pins on chip )!
@AndreasSpiess
@AndreasSpiess 2 года назад
The pin numbering usually has to be different because of technical reasons. This is acceptable. The rest is a pain in the ...
@EvenTheDogAgrees
@EvenTheDogAgrees 2 года назад
A good idea for us office workers who're now working from home due to COVID: a "mouse jiggler". Got an Arduino Leonardo/Micro compatible board with a small form factor, basically a stamp with a USB connector built into the PCB that slots into any free USB port, to move my mouse one pixel diagonally and back every minute. This way, my PC doesn't log me out every time I take a toilet break. And yes, before anyone comments: I know this is against security best practices. But I live alone and my doors are always locked, even when I'm home, so it's not like anyone can get physical access to the laptop while I'm briefly away from my keyboard. At night, when I step away from the machine for longer, or when I leave the house, it gets logged out.
@AndreasSpiess
@AndreasSpiess 2 года назад
A good idea if your PC policy is so strict.
@teixeirarg
@teixeirarg 2 года назад
You can install a small executable in the pc (I made one in Delphi ) that simulates a mouse that move...and thats all, you don't need a hardware for this!
@EvenTheDogAgrees
@EvenTheDogAgrees 2 года назад
@@teixeirarg That's great on your own PC where you have full admin rights. But if you have full admin rights, you don't need it as you can just disable the automated screen lock.
@tinygriffy
@tinygriffy 2 года назад
Puh, you must have been stuck in editing quite a while 🙈 Thanks Andreas :)
@AndreasSpiess
@AndreasSpiess 2 года назад
All my videos take a long time for editing ;-)
@electronic7979
@electronic7979 2 года назад
Excellent video 👏
@AndreasSpiess
@AndreasSpiess 2 года назад
Thank you very much!
@chuxxsss
@chuxxsss 2 года назад
I have 4 of them hanging around. By the way, busy day tinkering with solar and earth stake as well.
@AndreasSpiess
@AndreasSpiess 2 года назад
I saw on RU-vid that you are busy ;-)
@Danixu86
@Danixu86 2 года назад
With ATTiny85 is also possible, even there are Attiny85 modules with the USB connector to be programmed as external keyboards to automate tasks. Thanks for the video, maybe I'll buy an ESP32-S2 to test it. Can be useful to create bluetooth dongles to connect PS3/4 gamepads for example, without the use of external softwares that sometimes fails.
@AndreasSpiess
@AndreasSpiess 2 года назад
Unfortunately, The -S2 does not offer BLE :-( The ATTINY85 is a cool chip. However it has not many pins left in this scenario...
@bobyrev
@bobyrev 2 года назад
Thanks! It was really interesting
@AndreasSpiess
@AndreasSpiess 2 года назад
Glad you liked the video!
@bbogdanmircea
@bbogdanmircea 2 года назад
Can the Joystick library be adapted to work on the ESP S2? I have my Sim Racing Pedals running on a Arduino Micro, would be great to make a Wireless Button Box or Shifter Too.
@AndreasSpiess
@AndreasSpiess 2 года назад
I assume it could be done. But I never tried.
@Luke-san
@Luke-san 2 года назад
'Make sure you have ver2.0.0' , here is me staring at ver1.0.6. Never mind going crazy at keyboard stuff :-)
@AndreasSpiess
@AndreasSpiess 2 года назад
Check if you have the newest string in the preferences tab. Maybe they changed it. I do not remember.
@Luke-san
@Luke-san 2 года назад
@@AndreasSpiess I have been upgrading the Arduino software from my fathers pc. The installation of that software was way before 2013 because I still see my fathers projects. I may need to do a full install from scratch. My father passed away in 2015 btw. Time is moving fast, to fast, it seems. To bad he can't contribute to the community anymore.
@AndreasSpiess
@AndreasSpiess 2 года назад
Sorry to hear that you lost your father early. Yes, you need to be on the newest version of the IDE. A new install should not be a big issue if you do not messed with the core...
@yekutielbenheshel354
@yekutielbenheshel354 2 года назад
Excellent video. Thanks Andreas.
@AndreasSpiess
@AndreasSpiess 2 года назад
You are welcome!
@Talaxianer
@Talaxianer 2 года назад
The next project idea is to build an ESP password saver, that types in the required password when connected with PC
@clydealcott3379
@clydealcott3379 2 года назад
Get an Attiny85 usb board
@AndreasSpiess
@AndreasSpiess 2 года назад
That would be possible. However, a password manager is probably an easier possibility for that. Using an ATTINY would mean that you always use the same passwords ;-) Change means re-programming, I assume.
@techplanethk
@techplanethk 2 года назад
Thanks for the video!
@AndreasSpiess
@AndreasSpiess 2 года назад
You're welcome!
@yoganand1004
@yoganand1004 2 года назад
My google skills failed me and I couldn't find any information on why certain esp chips (esp32, esp32c3, etc) do not support circuitpython. it's because those chips don't support the advanced usb modes such as hid/storage. Thank you!
@AndreasSpiess
@AndreasSpiess 2 года назад
You have to ask Adafruit. I do not know :-(
@paulojadergodoi7422
@paulojadergodoi7422 2 года назад
Excelente. Congrats !!!
@AndreasSpiess
@AndreasSpiess 2 года назад
Thank you!
@Scrogan
@Scrogan 2 года назад
Well, the STM32F103 (or better) has been around for quite a while on the bluepill dev-board and has native USB hardware. Also I think some Uno boards have a 16U2 or similar native USB MCU on them for programming that you can reprogram yourself via the ICSP header. Either way what I care about is cost. I’ll look into the ESP32-S2 if they’re cheaper than a (legit) STM32. If you’re really looking for something cheap then the CH55x series MCUs provide native USB for a low cost, but they’re 8-bit not 32-but, and I haven’t seen any good tool chains for them yet.
@AndreasSpiess
@AndreasSpiess 2 года назад
I agree that many STMs also have USB. And you can reprogram the 16U2. But it is a pain in the ... Most projects I saw used the Pro Picro. This is why I mentioned it.
@Vindolin
@Vindolin 2 года назад
The only problem is that the emulated keyboard device stops working after the host awakes from sleep mode. I found out when trying to use an ESP32 S2 to login into my Win10 box when it gets a message over MQTT. Also there's no Power Management tab in the device settings where one could enable "Allow this device to wake the computer"
@AndreasSpiess
@AndreasSpiess 2 года назад
I never tried it in this configuration. I assume you need a lot of USB know-how to debug this one...
@ertopex
@ertopex 2 года назад
Me: I understand how this works. Andreas: Errr. Not quite so.. let me explain.
@AndreasSpiess
@AndreasSpiess 2 года назад
:-)
@jean-marcparatte5564
@jean-marcparatte5564 2 года назад
Sometimes it could be very difficult to send text to EXCEL, because some hidden softwares get instant focus and correctly restore quickly focus, but sent characters are lost of EXCEL and addressed to some hidden programs.
@AndreasSpiess
@AndreasSpiess 2 года назад
True. It is not an ideal solution. More a "quick and dirty" one.
@Uncle-Duncan-Shack
@Uncle-Duncan-Shack 2 года назад
Hi Andreas, You just reminded me of the mouse code I played with on a Teensy4.1 It moves the mouse in a triangle when plugged into a pc. Being small it is easy to plug in and hide. Can be disguised as a flash drive very nicely. And it creates major chaos, guaranteed. I enjoyed this video, quite applicable to evil me. Thanks for making and sharing. Kind regards, South Africa
@AndreasSpiess
@AndreasSpiess 2 года назад
You are right. The teensy and some STM32s have USB, too
@TecSanento
@TecSanento 2 года назад
Couldn you create a Pair/set of wireless usb extensions ? The ESPNOW function creates a Mesh network, and a Master Keyboard Plugged into USB Host of one device transfers keystrokes simultaniously to all connected clients, or the opposite way round, create a wireless USB Hub, where multiple Wirless Devices as Connected to a Host PC, now able to access them wherever they are (inside your network).... or you could create a wireless barcode Scanner, one device enters the data into your pc, one ESP Cam scans the qr code ;) ?
@AndreasSpiess
@AndreasSpiess 2 года назад
Good ideas if you have a use case for them. I do not own a lot of PCs ;-)
@paulmooij
@paulmooij 2 года назад
Thank you 🙏 always enjoy your video’s Give me some ideas to add some work from home automation( switch on / off mic for video call + windows blinds ect ) …
@AndreasSpiess
@AndreasSpiess 2 года назад
Sounds great! If you have a lot of video calls.
@MrBoi96969
@MrBoi96969 Год назад
hey andreas i have ordered a esp32 S2 solo devkitC-01 development board . i want to ask that will this work as a hid keyboard like arduino pro micro plzz answer
@AndreasSpiess
@AndreasSpiess Год назад
It should work.
@innomkr
@innomkr 2 года назад
Thanks for the great video!
@AndreasSpiess
@AndreasSpiess 2 года назад
Glad you liked it!
@Jonathan-vx2qj
@Jonathan-vx2qj 2 года назад
Maybe you can use this as an "invisible" wifi keyboard logger.
@AndreasSpiess
@AndreasSpiess 2 года назад
That would be the other way round. I never saw such a project with the ESP32-S2
@sirhotpain
@sirhotpain Год назад
Great video, as always! Have you been able to get some real world data regarding energy consumption of the ES32-S2 with wifi during light sleep? As ESP-NOW uses the wifi library and hardware, I assume using it should also be possible during light sleep. But would be great to have confirmation. :)
@AndreasSpiess
@AndreasSpiess Год назад
Same answer as before :-(
@sirhotpain
@sirhotpain Год назад
@@AndreasSpiess Sorry for double posting. I discovered this video after my previous comment and thought it'd fit better here, so more people can find it if they are interested in the same topic. :) BTW: after watching all of your board comparison videos, I'd encourage you to try more olimex boards. They have lots of ESP32 variants. Many have battery chargers, use extremely little energy in deep sleep (e.g. 20µA for the ESP32-S2 variants) and most are also sold as an EA version with an external antenna. Including the one you already tested. So you could update the google docs list with a new board, without even having to buy and test a new device. ;)
@robertwhite3694
@robertwhite3694 Год назад
I have a project using a USB barcode scanner through a USB host shield board to an ESP32 Devkit board. it reads the information as a keyboard and compares a scanned code against a desired code. but it is too slow for some of the more modern scanners and I need to find a way to read through the dedicated USB is there an example as I cannot find any.
@AndreasSpiess
@AndreasSpiess Год назад
First I would ask myself: Where is the bottleneck and where do I lose the time...
@klassichd10
@klassichd10 2 года назад
The next most useful functionalities for a USB host would be the integration of drivers for USB serial converter such aus FTDI CP2102, CH340. Example: Adapt Zigbee Sticks, ZWave Sticks etc. These Sticks use USB to be connected to a Raspi or a real computer. But if your computer with the home automation system is in the basement and not at the place of best RF reception? Then you need a bridge between these USB devices and your computer via LAN/Wifi. You can use a Raspi for that. But maybe the ESP32 could do the trick also?
@EvileDik
@EvileDik 2 года назад
Zwave forms a mesh network so reception is not much of a problem as long as the Zwave stick can communicate with at least one client, this will repeat signals to other clients in range.
@AndreasSpiess
@AndreasSpiess 2 года назад
So far I did not see such a project. But technically, it should be possible. But it probably needs some knowledge about the Zigbee or other stacks. The mesh functionality can help to overcome bad connections, too.
@klassichd10
@klassichd10 2 года назад
@@AndreasSpiess sorry, I was not clear enough. These Sticks typically include a FTD or CP2102 or CH340 as an USB interface. So what is needed is a Driver for these Chips and a bridge to LAN Wifi. I solved this issue by a HW modification and an additional piece of HW. Works well, but if the ESP32 has USB host, a direct SW integration would be nice.
@AndreasSpiess
@AndreasSpiess 2 года назад
Aha. You are right. But did you see a host implementation for the ESP32?
@KiraSlith
@KiraSlith Год назад
Here's a seemingly mundane idea, an ESP32-S2 based Smart Keyboard, possibly QMK compatible? They're so powerful and cheap it seems like a no-brainer to use as the core of a mechanical keyboard you can add additional features to. Something similar to the old Logitech G series but open FOSSware?
@AndreasSpiess
@AndreasSpiess Год назад
I am not in keyboards, so I do not know if such a project already exists.
@KiraSlith
@KiraSlith Год назад
@@AndreasSpiess I only found one in my digging, "Sanctuary", not on the S2, and they didn't take full advantage of it's capabilities. In theory it shouldn't be too hard on the hardware-side, it's just a big 70-button input matrix, but it's the software that's a hitching point.
@KiraSlith
@KiraSlith Год назад
Update for those who find this post: A newer keyboard software project has taken over support for the ESP32-S2. KMK, it's basically QMK in Circuit Python. A little harder to figure out going in blind, but it works all the same.
@atamico
@atamico 2 года назад
In this particular case, it looks like it's possible to connect a webcam via USB, right? I plan to put an endoscopic USB camera on the ESP32-S2 and turn it into a local IP camera (local webserver cam - Livestream). it is possible?
@AndreasSpiess
@AndreasSpiess 2 года назад
Espressif's home page says: "With its native USB interface, ESP32-S2 can connect to a camera that supports USB Full-Speed ​​mode"
@atamico
@atamico 2 года назад
@@AndreasSpiess Thank you very much, very good to know that this is possible. I just need to find now how to do the whole process.
@techcraftsguru
@techcraftsguru Год назад
Very nicely explained. I have a question can we interface USB barcode scanner directly with ESP32 ?
@AndreasSpiess
@AndreasSpiess Год назад
You get barcode readers which emulate a keyboard. They should be ok. Maybe you fond also readers with serial connection. That would be easier.
@emmanuelr6698
@emmanuelr6698 2 года назад
Hello Andreas, this is very interesting, as usual. I'm a bit confused about 2 points : First, how do you connect the D+/D- pins on a PC ? Do you split a USB cable ? Other question : Why shouldn't you use the VCC/5V/3.3V pins ? Cheers
@StreuPfeffer
@StreuPfeffer 2 года назад
at (6:24) he shows a MicroUSB Breakout connected to the pins and then its just a normal USB cable you plug in. The Host (PC) provides 5V to power the Peripheral so plugging it into 3V3 would kill the ESP as its just running on 3V3 (which it has a regulator on board. And depending on where the "normal" USB connector is connected to it may have a different potential which might kill your USB port in the PC, just the USB function in the ESP or the whole ESP.
@emmanuelr6698
@emmanuelr6698 2 года назад
@@StreuPfeffer thank you, very clear.
@DoctorWhom
@DoctorWhom 2 года назад
@@emmanuelr6698 Don't forget the GND (it is shown in the video briefly, but you need 3 wires for the USB: D- D+ GND)
@jedidiahpaterson4906
@jedidiahpaterson4906 2 года назад
@@StreuPfeffer Hi, quick question: It is that you don't plug into the 3.3V and 5V to supply power (because the by passes on board voltage regulator ) to the board but you can get 3.3V and 5V out of the board that way, correct?
@AndreasSpiess
@AndreasSpiess 2 года назад
@StreuPfeffer: Thank you for answering the question. @jedidiah paterson: Most boards have a 3.3 volt regulator and a pin to use 3.3 volts for other components like sensors.
@robertbridges4927
@robertbridges4927 2 года назад
Teensy 4.1 has had this capability since it was introduced. It has two USB ports, one is used for programming connected to the PC and the other as a USB host. Many people have been using it to simulate mice and keyboards. By the way it is also equipped with hardware ethernet and it runs at 600mHz. Have you used the one you received many months ago? You said you were going to experiment with it.
@AndreasSpiess
@AndreasSpiess 2 года назад
You are right. I had it once in a video. It is a beast! I would call it an overkill for such a simple application.
@robertbridges4927
@robertbridges4927 2 года назад
@@AndreasSpiess I agree, but what have you done with it? Is it sat in a drawer all ignored or worse still gone to landfill?
@austinrhoads
@austinrhoads Год назад
When I try to use this on my Adafruit esp32 s2 feather I get an error: Compilation error: 'USBHIDKeyboard' does not name a type Anyone else have this issue or can point me to a solution? UPDATE: Silly me, I had the wrong board selected :)
@theoldbigmoose
@theoldbigmoose 2 года назад
Andreas and this community are knowledgeable and creative, so I was wondering if folks had an insight on a development direction to get screen shots off of Tektronix TDS3000B series scopes. These were designed to use 3.5 inch floppies for screen capture data transfer, but they do have an RJ45 for network connection. Is anyone aware of any projects to retrofit these very capable, but outdated scopes to use the network interface to skirt the utdated floppy?
@AndreasSpiess
@AndreasSpiess 2 года назад
Maybe you get an answer from another viewer. I assume you already asked Google…
@NiHaoMike64
@NiHaoMike64 2 года назад
If it's new enough to have a Web UI, just wget the image.
@jessiegashler427
@jessiegashler427 2 года назад
Love your work sir
@AndreasSpiess
@AndreasSpiess 2 года назад
Glad to hear that!
@xyli7073
@xyli7073 2 года назад
I want to use the WiFi + USB OTG+MQTT function of esp32-s2 to wake up the dormant computer, but I find that although the computer can continue to power esp32-s2 through USB after dormancy, the mqtt works normally, but the analog keyboard will be disconnected at this time. I don't know who has good suggestions.
@AndreasSpiess
@AndreasSpiess 2 года назад
If you cannot wake the computer via keyboard you can try wake on lan (if you use Ethernet cable)
@PeetHobby
@PeetHobby 2 года назад
vusb works on all micro's with enough power and a interrupt pin, kan emulate HID with all arduino's, build many USB project with it in past decade.
@AndreasSpiess
@AndreasSpiess 2 года назад
I never did it myself, but other viewers suggested to use this bit-banging approach even on an ATTINY...
@Steve-pm1zy
@Steve-pm1zy Год назад
Hello Andreas, you're video was great! I just have one question. Can the esp32-s2 emulate the mouse clicks wirelessly over wifi?
@AndreasSpiess
@AndreasSpiess Год назад
If you want to connect a mouse to the ESP32 it has to support host mode. Which seems not to be the case for the Arduino IDE.
@subuser9627
@subuser9627 2 года назад
Look at the Teensy 4, can do a lot...
@AndreasSpiess
@AndreasSpiess 2 года назад
True. But no Wi-Fi :-(
@subuser9627
@subuser9627 2 года назад
@@AndreasSpiess you can use a wifi dongle or a bluetooth dongle on the USB host port
@AlexKite68
@AlexKite68 Год назад
Thank you Andreas, Your videos as always are very useful. I have lots of traditional ESP32 chips (without USB support) - Please can you propose the easiest hardware solution to make them read data from USB devices like USB-GPS dongle? I tried to connect them via USB-to-UART converter, but for some reason it didn't work.
@AlexKite68
@AlexKite68 Год назад
I suppose the trick is that USB-to-UART converter supposes that HOST is on USB side, and DEVICE is on UART side, but in case with USB-GPS dongle we have DEVICE on USB side, and probably this confuses to converter chip? How we can transmit/decode data properly from DEVICE on USB side to HOST (ESP32) on UART side?
@AndreasSpiess
@AndreasSpiess Год назад
You should find USB host adapters for Arduinos on Aliexpress. They should work also with the ESP32.
@AlexKite68
@AlexKite68 Год назад
@AndreasSpiess Thank you, Andreas!
@Dialbist
@Dialbist 2 года назад
Please create video about Expressif RainMaker
@AndreasSpiess
@AndreasSpiess 2 года назад
Why do you think?
@dd0356
@dd0356 2 года назад
USB has been around for a very long period yet not many micros support it natively. Of course, esp32+USB will be very useful. Wifi disk might be useful to change contents while actually being read/written over wifi. or maybe a USB webcam? or maybe simply a wifi keyboard for ancient pi. but the USB protocol looks very complicated and looks like i don't have the s2 version so i have to watch only on youtube.
@dd0356
@dd0356 2 года назад
or maybe make special devices and write drivers on linux like in this series: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-NYRhkGrt4Q4.html
@AndreasSpiess
@AndreasSpiess 2 года назад
Another user gave me the tip to use the USB disk on the ESP32-S2 for programming. And really, if you place a new bin file on the drive the ESP reboots and starts with the new sketch. Cool! If Arduino would support the copying of the file directly to the disk this would be a very fast uploading possibility. Without programming. Just selecting the "MSC" option before uploading the first sketch.
@dd0356
@dd0356 2 года назад
yes usb disk to place code would make the process COOL!
@STRATOS13PAO
@STRATOS13PAO 2 года назад
You havent put the video numbers on some of your latest videos. Dont know if this is intentional or accidental, just letting you know. :-) I really like your videos , great work.
@AndreasSpiess
@AndreasSpiess 2 года назад
Always the last ten or so have no numbers…
@macieksoft
@macieksoft 2 года назад
Emulating keyboard and
@DoctorWhom
@DoctorWhom 2 года назад
Is STM-32 available in arduino these days?
@macieksoft
@macieksoft 2 года назад
@@DoctorWhom Yes it is, and it actually works quite well with Arduino IDE.
@peterjansen4894
@peterjansen4894 2 года назад
Leonardo was USB capable too
@AndreasSpiess
@AndreasSpiess 2 года назад
You are right. It is more-or-less the same as the Pro Micro. Just bigger (and more expensive).
@Bianchi77
@Bianchi77 2 года назад
Cool video, keep it up, thank you :)
@AndreasSpiess
@AndreasSpiess 2 года назад
Thanks, will do!
@sanskarbhusal1924
@sanskarbhusal1924 2 года назад
Can't we make a wireless USB connector for actual physical keyboard using this Arduino?
@AndreasSpiess
@AndreasSpiess 2 года назад
It should be possible. You just have to search for the right software/library.
@DAVIDGREGORYKERR
@DAVIDGREGORYKERR 2 года назад
Corning Fibre Optical USB cables can be up to a mile long.
@DoctorWhom
@DoctorWhom 2 года назад
How much is that :D
@AndreasSpiess
@AndreasSpiess 2 года назад
You are right.
@karlharvymarx2650
@karlharvymarx2650 2 года назад
A while back I used a Teensy(???) to replace the brains in a keyboard. A nice feature I added were non-keyboard modes. Like I could double tap F1 to make it act like a mouse I could move by pressing and holding keys so that I didn't have to keep taking my hands off the keyboard to move the mouse. More recently I used an ESP32-S2 and sensor fusion board to make a joystick. I want to put it in a case that looks like a Star Trek Phaser but my FreeCad skills weren't up to snuff to modify a downloaded 3d model of one for 3d printing.
@AndreasSpiess
@AndreasSpiess 2 года назад
If you do not need Wi-Fi you have other possibilities as the Teensy, I agree. For most of those simple applications it is probably an overkill compared to a Pr Micro clone. But otherwise it is a nice chip. And downloading models is much faster than creating one. I also do this from time-to-time
@iliasalaur
@iliasalaur 2 года назад
10:30 Actually it would be better to use Java (or Processing) for generating .CSV files from MQTT data
@AndreasSpiess
@AndreasSpiess 2 года назад
Also a possibility. However I like the "realtime" aspect of the direct entry in some cases.
@user-oy4rm9kr4t
@user-oy4rm9kr4t 2 года назад
ESP32 S3 is out, please review it. I am very interested with its ADC, I hope it's reliable enough. Now I am using ADS1115 with ESP32.
@AndreasSpiess
@AndreasSpiess 2 года назад
AFAIK it is not yet supported by the Arduino IDE.
@DavidGlaude
@DavidGlaude 2 года назад
@@AndreasSpiess But there is work being done in CircuitPython and MicroPython for the S3. Not sure MP use TinyUSB, but CP always do, your last comment in the video might confuse MP and CP, but maybe you are right. Kit board for the S3 also provide two USB, one for the console and one for the native. So no need to add a connector. So maybe you want to visit the S3.
@MPElectronique
@MPElectronique 2 года назад
Hello! A question, why do you need to add another usb connector for windows keyboard function? Thanks. Marc.
@AndreasSpiess
@AndreasSpiess 2 года назад
As I tried to show in the video, the native USB function is not connected to the USB connector.
@Pozzyfunk
@Pozzyfunk 2 года назад
Thank you Andrea, I was enthusiastic for the emulating keyboard function and therefore I developped my own application however the emulation doesn't work during notebook boot (e.g. to modify BIOS setting). Other USB external keyboards work as expected. Any idea?
@AndreasSpiess
@AndreasSpiess 2 года назад
I do not have enough USB know-how :-(
@RoySATX
@RoySATX 2 года назад
6:50 "Because I'm now used to this crap, I stayed calm and continued" Ah, yes, the right-of-passage all successful tinkerers' and makers must go through when working with such boards.
@AndreasSpiess
@AndreasSpiess 2 года назад
Indeed!
@edwardcdg
@edwardcdg 2 года назад
Good stuff!!!
@AndreasSpiess
@AndreasSpiess 2 года назад
Thanks!
@MrBoi96969
@MrBoi96969 24 дня назад
Hey i want to ask that i also bought esp32 S2 wrover development board but im litlle bit confused that if it can work same as a rubber ducky to crack password???
@AndreasSpiess
@AndreasSpiess 14 дней назад
I do not crack passwords :-(
@jutgensw
@jutgensw 2 года назад
As usual an excellent video. Thank you. When using the ESP3D lib to communicate with a 3D printer via WiFi using a standard ESP32 it is necessary to hack the printer motherboard to get access to the serial port on the other side of the USB chip. Will it be possible to connect it directly to the USB port if you use the ESP32 S2 ?? (Mabe a project for you to do ?)
@AndreasSpiess
@AndreasSpiess 2 года назад
It might be possible. I would ask the project because I assume it would be interesting for all users. Maybe they even tried and it did not work?
@atentoktoto
@atentoktoto 2 года назад
An Arduino board with an amazing level of USB client/host support is Teensy 4/4.1. No WiFi though.
@AndreasSpiess
@AndreasSpiess 2 года назад
You are right. Many other ARM based chips also offer native USB.
Далее
How to Connect a PC Keyboard to an Arduino?
6:12
Просмотров 52 тыс.
#363 Which ESP32 pins are safe to use?
11:53
Просмотров 128 тыс.
Creating an IMU-based 3D Mouse with an ESP32-S3
16:16
How This New Battery is Changing the Game
12:07
Просмотров 40 тыс.
ESP32-S2 USB
12:26
Просмотров 8 тыс.
Самые бесчеловечные люди..
0:48
Просмотров 346 тыс.
Самые бесчеловечные люди..
0:48
Просмотров 346 тыс.
Robot 🤖 cleaning 🧹
0:57
Просмотров 4,7 млн