#152

Поділитися
Вставка
  • Опубліковано 28 вер 2024
  • In video #147 I said, that the Arduino IDE can only use one Serial connection of the three available on the ESP32. A viewer told me, that this is wrong and pointed me to the right direction. And then, I even found a third, “secret” Serial connection.
    Links:
    ESP32 pins: docs.google.co...
    Supporting Material and Blog Page: www.sensorsiot.org
    Github: www.github.com...
    If you want to support the channel and buy from Banggood use this link to start your shopping: bit.ly/2jAQEf4 (no additional charges for you)
    Official Wemos Store: s.click.aliexpr...
    / sensorsiot
    / spiessa
    www.instructab...

КОМЕНТАРІ • 270

  • @aemvasconcelos
    @aemvasconcelos 7 років тому

    I like your videos. Well done. In this video you touched the subject of flow control and said that speed and buffers solved anything, but, look around, there's some kind of flow control everywhere in electronics.

    • @AndreasSpiess
      @AndreasSpiess  7 років тому

      +Ocsav I I only referred to RS232 which is very slow. Faster protocols of course use flow controls.

    • @aemvasconcelos
      @aemvasconcelos 7 років тому

      Andreas Spiess I thought that only asynchronous communication (like rs-232) needed flow control but it looks that communication between chips use 1 pin to do some kind of flow control even when there is a clock.

  • @mohamdazize8953
    @mohamdazize8953 8 місяців тому

    Thank old man
    your are the best
    i search all UA-cam and you like always help me
    Thanks and stay safe

  • @MikeKranidis
    @MikeKranidis 7 років тому

    Good fast lesson dear Mr. Andreas Spiess! The topic of ESP32 is in top priority for me. I am trying to learn how to work with IDF, ex how to "install" libraries in the Arduino IDE sense. It looks not easy at all though... If you know this topic please offer me/us a informative video when you can. Thanks in advance.

    • @AndreasSpiess
      @AndreasSpiess  7 років тому +1

      So far, I only know the Arduino IDE and have no other experience.

  • @PhattyMo
    @PhattyMo 7 років тому

    Happy to help out fellow tinkerers,Cheers!

  • @deangreenhough3479
    @deangreenhough3479 6 років тому

    Back again, I knew id seen a video somewhere....... This has been a great help thank you

    • @AndreasSpiess
      @AndreasSpiess  6 років тому

      You are welcome. I recently myself had to go back to this video because I needed this info for a project...

  • @byxlettera1452
    @byxlettera1452 6 років тому +1

    Interesting as usual! Very clear and you hit the point.
    Thanks

  • @RuiRex
    @RuiRex 7 років тому +17

    I think that you can call Serial.begin(baud_rate, config, , ) (or something like that) and define the pins you want to use without having to mess with the library files...
    I haven't tried it yet so I can't confirm if it works...

    • @RuiRex
      @RuiRex 7 років тому +2

      Also mentioned here: www.esp32.com/viewtopic.php?t=328

    • @AndreasSpiess
      @AndreasSpiess  7 років тому +1

      Thanks for the tip.

  • @amiga68k75
    @amiga68k75 6 років тому

    Hi Andreas. Great video as usual! Helped me a lot. Thank you!

  • @chuckwilcox6997
    @chuckwilcox6997 7 років тому

    Great work again, very interesting. Thank you for taking the time to share your findings and knowledge.

  • @HansVledder
    @HansVledder 7 років тому

    Excellent video again Andreas! Thank you very much!

  • @wei48221
    @wei48221 7 років тому

    Always enjoy your video....

  • @vipinckty1
    @vipinckty1 3 роки тому

    Thank u for sharing the knowledge

  • @klassichd10
    @klassichd10 7 років тому

    Just a notice: A few days ago the github.com/espressif/arduino-esp32 has been updated. This also contains a new partition table (default.csv) for flash and a migration of EEPROM lib from ESP8266. And it works (up to 4096) as described there github.com/espressif/arduino-esp32/issues/525

    • @AndreasSpiess
      @AndreasSpiess  7 років тому

      Thanks for the tip!

    • @klassichd10
      @klassichd10 7 років тому

      Now I also have NTP and OTA running. OTA is not always shown in the arduino IDE but it works using espoty.py from Batch or command line. Now I have more hope in migrating some ESP8266 projects to ESP32

    • @klassichd10
      @klassichd10 7 років тому

      Great! I had some trouble with the migration of the webserver.
      But this github.com/espressif/arduino-esp32/tree/5e89f5e9fabe56d8e8af956bcd7635bf218e29a0/libraries/ESPWebServer/src helped.
      But as you can see there github.com/espressif/arduino-esp32/pull/430 unfortunately this will not be supported by the "official ESP32 community" in the future. But for now it seems to work.

    • @AndreasSpiess
      @AndreasSpiess  7 років тому

      :-)

  • @Salfke
    @Salfke 4 роки тому

    Hi Andreas, I knew you made a great video about getting both UARTS to work with ESP32.
    Unfortunately the content of the video results in a not working result if you use the latest ESP32 software.
    if i use the following lines: HardwareSerial Serial1(1); / HardwareSerial Serial2(2); the serial ports don't work at all.
    without using HardwareSerial lines, the ports work fine.

    • @AndreasSpiess
      @AndreasSpiess  4 роки тому

      True. They changed the syntax. Thank you for mentioning it.

  • @carlopane4368
    @carlopane4368 3 роки тому

    This might be a bit off topic, but would you have an insight into why an ESP32cam can send data to a serial monitor but when using pyserial it causes it to reset and no longer connect to wifi. As soon as I stop the program attempting to read from pyserial and go back to the serial monitor, the esp32 reboots and works fine.
    I have made sure my baudrate is set correctly.

    • @AndreasSpiess
      @AndreasSpiess  3 роки тому +1

      I never looked into these ESP32cam boards, so I do not know:-(

    • @carlopane4368
      @carlopane4368 3 роки тому

      @@AndreasSpiess I sorted it out, it seems to be an issue with the flow control sequence, github.com/pyserial/pyserial/issues/124

  • @udayangas
    @udayangas 4 роки тому

    I'm using Wemos LOLIN32 (Retired). HardwareSerial1(2); is not working for me. But by using Serial2.begin(115200); in the setup I get it working. Any idea why this is happening?

    • @AndreasSpiess
      @AndreasSpiess  4 роки тому

      No maybe they changed definitions since then.

  • @avejst
    @avejst 7 років тому

    Thanks for sharing

  • @zgryx8428
    @zgryx8428 2 роки тому

    Hello sir can you do ESP32 Camera module and Arduino Serial communication? it doesn't work for me. Thank you so much for a wonderful tutorial❤️

    • @AndreasSpiess
      @AndreasSpiess  2 роки тому

      Unfortunately, I cannot do remote debugging :-(

  • @СистемныйАдминистратор-э3ц

    Thank you for your video !! It really helped me! You can make a link to the file with contact numbers and the notation of ESP32.xlsx?

    • @AndreasSpiess
      @AndreasSpiess  6 років тому

      You find the link in other ESP32 videos.

  • @fabricemenard4929
    @fabricemenard4929 4 роки тому

    Thanks a lot for this very understandable video. Nowadays, the path to HardwareSerial2.cpp looks to have changed, not in ProgramFiles x86 anymore (only the one for AVR platform), do you know where the esp32 files are now located? I looked for in users folder without success.

  • @petrdvorsky6615
    @petrdvorsky6615 3 роки тому

    So, I can REMAP UART1 and UART2 to any GPIOs I want?

    • @AndreasSpiess
      @AndreasSpiess  3 роки тому

      Yes. Just check: Not all pins can be used because they are used for other things.

  • @fabianrogg4272
    @fabianrogg4272 4 роки тому

    Thx for the video.
    Do you have an example, where one esp sends data to another esp via UART?

    • @AndreasSpiess
      @AndreasSpiess  4 роки тому

      No. I usually do this wirelessly ;-) I think you find such a project.

  • @karnasiwantarasuara9418
    @karnasiwantarasuara9418 5 років тому

    thanks

  • @LUCKY007725
    @LUCKY007725 6 років тому

    Thanks for useful information
    I have some sensors and relays connected with arduino uno and i want to make a communication between UNO and esp32 via SDA and SCL pins...
    On the uno, both are mentioned and working fine whereas the problem is with esp32
    Please guide me how to connect them and what code is required for esp32 for affective communication
    Regards

    • @AndreasSpiess
      @AndreasSpiess  6 років тому

      Maybe you search for an I2C tutorial for the ESP32. It has some specialties like the wire command.

  • @viniciusmay6580
    @viniciusmay6580 6 років тому

    Hi, thanks for your patience to teach us.
    I need to connect 3 serial ports on my esp32.
    Hw Serial 0 -> fw update and logs
    Hw Serial 2 -> gps
    Sw Serial -> gsm
    I already know that Serial 1 is connected to flash memory.
    So I need to emulate a serial port through GPIO's.
    I tried using an Arduino "Serial Software" library, but unfortunately on a compilation error. Reading in some forums and making some changes in the library, I was able to compile the "Sketch"; but the communication of my GSM modem via SoftwareSerial did not work.
    Note: By connecting the GSM modem separately to a USB / SERIAL converter the communication worked as expected. That is, the problem really is in SoftwareSerial emulation.
    Could you help?

    • @AndreasSpiess
      @AndreasSpiess  6 років тому +1

      Why do you not use this solution?

    • @viniciusmay6580
      @viniciusmay6580 6 років тому

      Andreas Spiess because this dont works too :(

    • @viniciusmay6580
      @viniciusmay6580 6 років тому

      Please, i want that you see my image in this link: screenshot.net/pt/d65llbv
      So. I need this configuration in my esp32 project:
      The GPS module sends data position to UART0.
      The GSM module sends data to UART0 It also receives commands that must be sent by UART0 (at commands, for example).
      Finally, "uart0" serves as interface for the computer or other microcontroller, both for data traffic and firmware update
      Please, can you help-me?
      /*********************************************************/
      HardwareSerial Serial1(1); // is not linked to flash memory
      HardwareSerial Serial2(2); // hardware serial (uart2 on esp32)
      void setup()
      {
      Serial.begin (115200);//uart0 - flash firmware update and serial monitor interface
      Serial1.begin (9600) ;//uart1 - gps - only send data position to uart0
      Serial2.begin (115200);//uart2 - gsm
      }
      void loop()
      {
      while(1)
      {
      char r = Serial1.read ( );
      Serial.print (r);
      Serial2.println ("at");
      Serial.print(Serial2.read () );
      }
      }
      /*******************************************************************************/

  • @colinparker9267
    @colinparker9267 4 роки тому

    Does anyone know where I can find this HardwareSerial.cpp file on a mac with Arduino installed? I have added ESP32 boards in my boards manager but I'm not sure if I need to do something else so I can get to this file.

  • @elixesachterachtet
    @elixesachterachtet 6 років тому

    I'm searching for the excel file, you showed at 0:33. Where can i get it ?

    • @AndreasSpiess
      @AndreasSpiess  6 років тому

      I put it here: docs.google.com/spreadsheets/d/12qL3ui2BkSn91O0ISJU8QIL2mcG-r_vlX0briknA2QQ/edit?usp=sharing

  • @parasbhanot
    @parasbhanot 7 років тому

    Please make video about HTTPS request with esp32

    • @AndreasSpiess
      @AndreasSpiess  7 років тому

      This is for sure something I am interested in

  • @nburton01
    @nburton01 6 років тому

    Conflict between WiFi.h and analogRead
    Maybe worth putting on your spreadsheet.
    ADC1 pins CAN be used at the same time as WiFi.
    ADC2 pins DO NOT work when WiFi is in use - not sure about BLE.
    ADC1 GPIO pins: 32, 34 through to 39
    ADC2 GPIO pins: 6, 7, 8, 10 through to 17
    see:-
    www.esp32.com/viewtopic.php?t=796

    • @AndreasSpiess
      @AndreasSpiess  6 років тому

      These are quite old posts. Did you check if this is still true? I never used ADCs on the ESP32

    • @nburton01
      @nburton01 6 років тому

      Yes still not working (using eps-32 Arduino v1.0.0) cost me a lot of time figuring out what was going on so thought I would post it here to warn yourself and others.

    • @AndreasSpiess
      @AndreasSpiess  6 років тому

      So I will try it, too. Thank you for your warning!

  • @MPElectronique
    @MPElectronique 7 років тому

    Andreas, i got 3 mA in deepsleep with the module you showed on this youtube videos, is it normal?
    maybe i will have to remove the red led ?
    thank you.
    Marc.

    • @AndreasSpiess
      @AndreasSpiess  7 років тому +1

      There are a few things on these boards which consume current, the LED for sure, too

    • @MPElectronique
      @MPElectronique 7 років тому

      Andreas Spiess if i remove the led do u think i can sleep for years ?? Thanks. I got 1 week now... :(

    • @AndreasSpiess
      @AndreasSpiess  7 років тому

      No. You have to use a WROOM module only without the Serial to USB chip and the LDO. Development boards are not optimized for low current consumption

    • @MPElectronique
      @MPElectronique 7 років тому

      Andreas Spiess :-(

    • @MPElectronique
      @MPElectronique 7 років тому

      Andreas Spiess thank you.

  • @mickeypoppi
    @mickeypoppi 6 років тому

    Serial1.begin(9600, SERIAL8_N1, 4, 2); // Serial1.begin(baud, config, RX_pin, TX_pin ); // works

    • @AndreasSpiess
      @AndreasSpiess  6 років тому

      Thank you for this trick!

    • @juanfelipeluna1065
      @juanfelipeluna1065 5 років тому

      Didn't work for me. I am trying to send AT commands to the Pycom Gpy Modem as is showed in this post ( forum.pycom.io/topic/3134/using-pycom-boards-with-arduino-ide/2 ). The Pinout of the board reports being connected as LTE_TX = 23
      LTE_RX =5. Should be the UART initialized or define in another place?

  • @Aemilindore
    @Aemilindore 6 років тому

    Hi, the files no longer exist in that directory. Where can be locate the files? Have things changed now?

    • @AndreasSpiess
      @AndreasSpiess  6 років тому +1

      Maybe you watch my newest video and install the ESP32 accordingly. Then go to the directory where the preferences.txt file is installed. From there you go "packages\esp32\hardware\esp32\1.0.0\cores\esp32" and you will find hardwareserial.cpp

    • @Aemilindore
      @Aemilindore 6 років тому

      Andreas Spiess got it. I will do it that way. Thank you. It seems of you follow the official repos instructions, this file you say is not available. Thanks for quick response

    • @AndreasSpiess
      @AndreasSpiess  6 років тому +1

      I pinned a comment with the exact path. So it should be visible to everybody. A few other viewers asked the same question.

    • @Aemilindore
      @Aemilindore 6 років тому

      Andreas Spiess oh thank you. Will find it.

  • @yomboprime
    @yomboprime 7 років тому

    Hi Andreas. I bought a Lolin32 board and it gets hot very quick. I will not use the sleep modes because it is for a robot that will transmit video. I've put it a heat sink and a fan and it remains cool.
    ¿Do your different modules also get hot when active and using the WiFi?
    Thanks

    • @AndreasSpiess
      @AndreasSpiess  7 років тому

      So far I have no experience with heavy Wi-Fi traffic. But it is well possible that the module heats up as Wi-Fi is quite power hungry.

    • @yomboprime
      @yomboprime 7 років тому

      Thanks. I must buy one of those USB mA and V display meters to see the current it consumes.

    • @AndreasSpiess
      @AndreasSpiess  7 років тому

      Or a electronic load/Monitor I showed in one of my latest videos... ( a little more expensive, but with PC connections for monitoring)

    • @yomboprime
      @yomboprime 7 років тому

      Very interesting. Unfortunately the software is for Windows only, and I use GNU/Linux. Do you know if the serial protocol is documented?

    • @yomboprime
      @yomboprime 7 років тому

      Finally I bought two of the cheapest ones. I measured the Lolin32: 140mA idle (making delay(1000) in a "for" loop), and between 300 and 350 mA with heavy processor and WiFi usage :-)

  • @labkita
    @labkita 6 років тому

    there is no pin 16 and 17 in lolin32 pro

    • @AndreasSpiess
      @AndreasSpiess  6 років тому

      So you can shift these pins also to different pins using the method shown in this video. Or use another board ;-)

  • @DanielTremblayVideo
    @DanielTremblayVideo 5 років тому

    Great tutorial as always!
    What about this technique?
    github.com/G6EJD/ESP32-Using-Hardware-Serial-Ports
    #define RXD2 16
    #define TXD2 17
    Thanks!

    • @AndreasSpiess
      @AndreasSpiess  5 років тому

      This is not another method, it is only an extension if you need it. It works.

    • @DanielTremblayVideo
      @DanielTremblayVideo 5 років тому

      Thanks...it's not related to this video.... at the end i even flushed this method, i need only one i2c port but the pins are used by LAN8720... i figured that all i ad to do is to use regular Wire.h, some other pins and do this in setup:
      Wire.begin(32, 33);
      Keep your great work! you are the best!

  • @basementjack2
    @basementjack2 7 років тому +7

    Please setup a patreon account so we can send you a few dollars a month!

    • @AndreasSpiess
      @AndreasSpiess  7 років тому +11

      Thank you for your offer. Maybe at 50'000 subscribers. For the moment, I can finance my hobby...

    • @rafalmag
      @rafalmag 5 років тому

      Here there are:
      Patreon Page: www.patreon.com/AndreasSpiess
      Alternative: flattr.com/@andreasspiess

  • @mikoajwojciechowski9507
    @mikoajwojciechowski9507 7 років тому +5

    Great tutarial Andreas, as always :-) You are making incredeble work. I like you channel very much.

    • @AlexandreLeone
      @AlexandreLeone 7 років тому +2

      Mikołaj Wojciechowski Same here Mikolaj. He's the Best!

    • @AndreasSpiess
      @AndreasSpiess  7 років тому +3

      Thank you both!

  • @deangreenhough3479
    @deangreenhough3479 7 років тому +7

    Another quicky!!!! Keep them coming Andreas

    • @AndreasSpiess
      @AndreasSpiess  7 років тому +4

      Next two weeks it will be difficult...

    • @EwaldBurger
      @EwaldBurger 7 років тому +1

      Andreas Spiess Enjoy your holidays then Andreas (at least I hope that is the reason why it seems the coming two weeks we have to do without you 😀)

  • @fredrikakerlund9819
    @fredrikakerlund9819 7 років тому +10

    Joke:
    - "What's the best thing about living in Switzerland?"
    - "I don't know, but the flag is a big plus"

  • @p._7555
    @p._7555 4 роки тому +1

    Does the ESP8266 /NodeMCU applies for this "hack" ?

    • @AndreasSpiess
      @AndreasSpiess  4 роки тому +1

      No

    • @p._7555
      @p._7555 4 роки тому +1

      @@AndreasSpiess Thanks Andreas ! And thanks so much for your channel!!

  • @EduardoCaporale
    @EduardoCaporale 5 років тому +1

    Muchas gracias por compartir conocimientos Andreas, un cordial saludo desde Mar del Plata, Argentina.

  • @mrkumar6020
    @mrkumar6020 2 роки тому

    Hello @Andreas Spiess I am afraid to say that I tried it with ESP32 and not worked for me at all. Any further help will be greatly appreciated to fix this. Thanking you.

    • @AndreasSpiess
      @AndreasSpiess  2 роки тому

      Serial.print() and Google are your friends for debugging...

  • @AmauryJacquot
    @AmauryJacquot 4 роки тому

    you can specify pins in HardwareSerial.begin()
    see here : github.com/G6EJD/ESP32-Using-Hardware-Serial-Ports/blob/master/ESP32_Using_Serial2.ino

  • @mbueno0
    @mbueno0 6 років тому

    Anybody getting this error when trying to use attachInterrupt() on esp8266 or esp32? (Arduino IDE v.1.8.5, esp8266 v.2.4.1, latest esp32 board defs as of this week)?...
    functions.h:164: error: invalid conversion from 'boolean (*)() {aka bool (*)()}' to 'void (*)()' [-fpermissive]
    attachInterrupt(digitalPinToInterrupt(stepCounterInterruptPin), stepCountHandler, RISING);
    ^
    In file included from C:\Users\Bueno\_Arduino\hardware\espressif\esp32\cores\esp32/esp32-hal.h:52:0,
    from C:\Users\me\_Arduino\hardware\espressif\esp32\cores\esp32/Arduino.h:35,
    from sketch\exp32Driver_v0_01.ino.cpp:1:
    C:\Users\me\_Arduino\hardware\espressif\esp32\cores\esp32/esp32-hal-gpio.h:81:6: note: initializing argument 2 of 'void attachInterrupt(uint8_t, void (*)(), int)'
    void attachInterrupt(uint8_t pin, void (*)(void), int mode);
    ^
    stepCounterInterruptPin is pin 2, aka '2', the unsigned, 8 bit integer.
    email me with solution if you have one (please)! mbueno0@gmail.com

  • @OFCIFR
    @OFCIFR 2 місяці тому

    I think there is software serials library even for esp32 now, it's easier to use

  • @dominpiano
    @dominpiano 4 роки тому

    I don't have "espressif" folder in arduino\hardware....

    • @AndreasSpiess
      @AndreasSpiess  4 роки тому +1

      Maybe you watch the videos about installing the ESP32 in the Arduino IDE first

  •  7 років тому

    How do i clear serial buffer in the smallest amount of lines possible plz im using esp 8266?

    • @AndreasSpiess
      @AndreasSpiess  7 років тому

      Somethin like that?
      void serialFlush(){
      while(Serial.available() > 0) {
      char t = Serial.read();
      }
      }

    •  7 років тому

      Thanks il try it out later :)

  • @Weldod909
    @Weldod909 6 років тому +1

    I just discovered your channel right now, really nice ! Thanks a lot for your videos, you're great !

  • @andreaswimmer2392
    @andreaswimmer2392 6 років тому +1

    Great video! That was exactly what I was looking for! Thank you!

  • @ahmadmuhaimin2852
    @ahmadmuhaimin2852 Рік тому

    where can i find the folder location on mac? i use IDE 2.0

  • @alexramos2568
    @alexramos2568 4 роки тому

    Great info, but I still don't get it to work, I'm messing things up.
    I have a Heltec WiFi kit 32, the one with Oled and a GPS6MV2 module.
    I can't get the GPS module and the Oled to work at same time.
    Like to show GPS info on the screen.
    Is it even possible?
    Tried many code example, changed the code, add, remove lines...
    GPS woks alone, Oled woks alone but not together.
    Can use all the help.
    Thanks

    • @AndreasSpiess
      @AndreasSpiess  4 роки тому

      Unfortunately I cannot do remote debugging... I usually start with a running system and add line by line till it stops working...

    • @alexramos2568
      @alexramos2568 4 роки тому

      @@AndreasSpiess Im at the point were I using the UART1 to program the board and after to connect the GPS.
      But this is not the ideal configuration.

    • @alexramos2568
      @alexramos2568 4 роки тому

      @@AndreasSpiess Can you explain how to connect a serial sensor on UART3 and show the values on the Oled.
      I'm trying to used a Heltec WiFi kit 32 and a GPS module to make a position device for my cat over wi-fi.
      Thanks

  • @dileepgowda6586
    @dileepgowda6586 3 роки тому

    how to receive data from rs232 to esp32 using rts and cts in arduino

    • @AndreasSpiess
      @AndreasSpiess  3 роки тому

      RTS and CTS do not carry data, they just signal readiness of the device.

  • @windowofwords
    @windowofwords Рік тому +1

    I am working with nextion display and ESP32 earlier i uploaded the code in esp8266 to get value from the nextion using nextion.read using nextion.h library but now I am using ESP32 in ESP32 nextion.listen is working but nextion.read is not working i get value like 255 255 224 255 255 ...which are undesired values so kindly tell me what to do to solve this problem??

    • @AndreasSpiess
      @AndreasSpiess  Рік тому

      Unfortunately, I cannot remote debug :-(

    • @windowofwords
      @windowofwords Рік тому

      @@AndreasSpiess you don't need to debug I am just asking and can you guess what actually be a reason behind this because same code is working with esp8266 but when i use ESP32 it's not working 😅

    • @AndreasSpiess
      @AndreasSpiess  Рік тому +1

      @@windowofwords I have no idea 😞

  • @montectronyxz
    @montectronyxz 3 роки тому

    Thanks. Great Video. Very useful.

  • @Gocast2
    @Gocast2 Рік тому

    Well, it's been over 5 years since you made the video, and your edit of the .cpp file is the only thing that worked for me for Serial1 😂!!! Even the suggestion to use Serial1.begin (115200, SERIAL_8N1, 4, 2) continued to result in crashes. thanks!!!

    • @AndreasSpiess
      @AndreasSpiess  Рік тому +1

      I think you can now specify the pins in the Serial.begin command

  • @codebeat4192
    @codebeat4192 4 роки тому

    What about a BlueTooth Serial? Is this possible?

  • @Really2950
    @Really2950 2 роки тому

    Im still watching your old content :)

    • @AndreasSpiess
      @AndreasSpiess  2 роки тому

      Obviously. This is truly an old one ;-)

  • @betojasz
    @betojasz 7 років тому

    I have an issue with ESP32: I used it as a beacon scanner and tried two libraries different to scan(Using Arduino and Idf). Both, after a while, still searching for beacons but not finding anything at all and never back to find again untill reset!! Did you experienced the same? Thanks!!

    • @AndreasSpiess
      @AndreasSpiess  7 років тому

      So far, I have no experience with ESP32 and bluetooth. Maybe another viewer?

  • @vamsikrishna9825
    @vamsikrishna9825 5 років тому

    great work. mine was showing error
    Arduino: 1.8.3 (Windows 7), Board: "ESP32 Dev Module, Disabled, Default, QIO, 80MHz, 4MB (32Mb), 921600, None"
    Archiving built core (caching) in: C:\Users\vamsi\AppData\Local\Temp\arduino_cache_727941\core\core_esp32_esp32_esp32_PSRAM_disabled,PartitionScheme_default,FlashMode_qio,FlashFreq_80,FlashSize_4M,UploadSpeed_921600,DebugLevel_none_8b9dca6258b59a31a805e5f72ecef81e.a
    C:\Users\vamsi\AppData\Local\Temp\arduino_build_5118/arduino.ar(HardwareSerial.cpp.o):(.bss.Serial1+0x0): multiple definition of `Serial1'
    sketch\esp32softwareserial.ino.cpp.o:(.bss.Serial1+0x0): first defined here
    C:\Users\vamsi\AppData\Local\Temp\arduino_build_5118/arduino.ar(HardwareSerial.cpp.o):(.bss.Serial2+0x0): multiple definition of `Serial2'
    sketch\esp32softwareserial.ino.cpp.o:(.bss.Serial2+0x0): first defined here
    collect2.exe: error: ld returned 1 exit status
    exit status 1
    Error compiling for board ESP32 Dev Module.
    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.
    please helpme out.

    • @AndreasSpiess
      @AndreasSpiess  5 років тому

      I am not very good at remote debugging. But I am sure you will find it out yourself. The important sentence seems to be multiple definition of `Serial2'

  • @KroceBow
    @KroceBow 7 років тому

    Nice video, I am having some troubles setting the esp32 as a keyboard, I think either it's not yet implemented or I'm doing something wrong. I hope in your next videos you will cover this section :) !

    • @AndreasSpiess
      @AndreasSpiess  7 років тому

      So far, I have many other topics which have a higher Prio. As you mention, maybe there is no library around...

  • @PaulSchulinck
    @PaulSchulinck 3 роки тому

    Andreas thank you for the very informative video !
    I use an ESP32-S2-Saola-1R (WROVER). It has pin 43 marked as TXD and pin 44 as RXD. I see in the installed \cores\esp32\HardwareSerial.cpp the following(lines 63-69
    #if CONFIG_IDF_TARGET_ESP32
    rxPin = 3;
    txPin = 1;
    #elif CONFIG_IDF_TARGET_ESP32S2
    rxPin = 44;
    txPin = 43;
    #endif
    so, I don't have to change the definition for rxPin and txPin.

    • @AndreasSpiess
      @AndreasSpiess  3 роки тому

      Thanks for the update. This is an old video.

  • @SA-oj3bo
    @SA-oj3bo 6 років тому

    Hi Andreas, I made a design with ESP32-WROVER and I was shocked to find out that only 1 UART is free. I would be extremely happy if I can use the 3 uarts. Do you think it is possible to use any free pin for the TX and RX from Uart1,2,3? Is it possible to use interrupt buffers for every RX and TX ? IF so how to do that please? Thanks and kind regards.

    • @AndreasSpiess
      @AndreasSpiess  6 років тому

      1. You can try to use other pins. Most should work.
      2. I do not know about the buffers
      3. Maybe you watch this video: ua-cam.com/video/eUPAoP7xC7A/v-deo.html

  • @alanlovett3412
    @alanlovett3412 7 років тому

    What ESP32 do you use? Mine is a Geekcreit® ESP32 Development Board and only has 30 pins.

  • @andreyl2705
    @andreyl2705 Рік тому

    very useful. thank you)

  • @TomaszDurlej
    @TomaszDurlej 7 років тому

    RTS/CTS stuff aren't unnnecesary nowdays, with it a MCU can archive higest speeds of UART.

  • @iamsuperroot
    @iamsuperroot 4 роки тому

    What is use for 3rd? another tx?

  • @ikeo8666
    @ikeo8666 4 роки тому

    why does uart2 have 5v on the rails tho? esp32 uart is so weird.

    • @AndreasSpiess
      @AndreasSpiess  4 роки тому

      I do not think that any ESP32 pin has 5 volts.

    • @ikeo8666
      @ikeo8666 4 роки тому

      @@AndreasSpiess The volt meter doesn't lie. GPIO 16 & 17 are reading high 4's. But you know what after trying out those esp32s wrooms I've come to the conclusion they are garbage. They go into a reboot cycle if you don't supply the exact volts/amps on the 5v pins.. but work fine when using the USB connector. My ai thinker esp32 cam works like a champ. Think I'll stick to AI thinker esp32s from now on.

  • @guilhermeaugusto2396
    @guilhermeaugusto2396 4 роки тому

    May i have 4 or 5 UART Channels by editing the file hardwarSerial.cpp?
    Thanks

  • @FinneyDale
    @FinneyDale 6 років тому

    If I understand correctly, pins 1,3 (tx,rx) are used for serial 0. Can I map serial 1 or 2 to these pins?

  • @roycejp
    @roycejp 5 років тому

    Maybe this is a silly question... but where is this file (HardwareSerial.cpp) located ?

    • @AndreasSpiess
      @AndreasSpiess  5 років тому

      Just search it on the PC. On my PC it is here: ua-cam.com/video/GwShqW39jlE/v-deo.html

  • @CliveChamberlain946
    @CliveChamberlain946 7 років тому

    In the drawing at 4:05, RTS/CTS you show as one signal coming from the receiving computer, but RTS comes from the sender (also called Data Terminal Equipment) and CTS is on another separate pin coming from the receiver (called Data Communications Equipment). Often, this RTS to CTS delay was caused by slow modems that didn't empty-out their small send buffers quickly enough onto the analogue line, or modems still waiting on the process of dialing-out and/or carrier sync.

    • @AndreasSpiess
      @AndreasSpiess  7 років тому

      There was always some confusion with these names and who has which role, if I remember right. Fortunately, we do no more have to deal with them too much.

  • @AdrianCosic
    @AdrianCosic 7 років тому

    Nice video, I want to build a PM2.5 monitor with three serial sensors and this could be very useful.

  • @markangelonambatac5791
    @markangelonambatac5791 7 років тому

    Can you help me? Is it possible that If the BLE of esp32 will not detect any beacons it will send a notification through the internet?

  • @starlingwatch3921
    @starlingwatch3921 3 роки тому

    Grüetzi und Vielen Danke. It works! -Frank

  • @CraigHollabaugh
    @CraigHollabaugh 6 років тому

    Hey thanks. I needed this exactly! Didn't know that pin routing for esp23 uarts was possible.

    • @AndreasSpiess
      @AndreasSpiess  6 років тому

      I also discovered it by chance and thought, it could be useful for others...

    • @CraigHollabaugh
      @CraigHollabaugh 6 років тому

      Yes, many Arduino users don't know about pin muxing. I've updated my original post here with a hackaday explanation.

  • @aspuzling
    @aspuzling 7 років тому +1

    But... why would you ever want 2 serial buses, let alone 3?

    • @AndreasSpiess
      @AndreasSpiess  7 років тому +1

      Always if you want to connect one serial device and still need the Serial Monitor for debugging

    • @DamienWise
      @DamienWise 7 років тому

      aspuzling, excellent question; Andreas Spiess, perfect answer. Thankyou both!

    • @aspuzling
      @aspuzling 7 років тому

      Sorry, I still don't understand. What kind of serial device are you talking about? The only device I know of is the serial monitor.

    • @rusty0101
      @rusty0101 7 років тому +2

      You may be using the esp32 as a control interface for an external device that doesn't talk i2c or spi. For example you may be using the esp32 to provide a wireless link for a weather station, or as a means of controlling a cellphone device to send sms text messages advising of something like a water leak filling your basement. Many of these devices either communicate via uart or rs232/serial. While you may only need a single serial connection for these most of the time, having a second, or third for some situations, may be the only way of debugging what the esp32 is seeing as you are developing your project.

    • @MagivaIT
      @MagivaIT 5 років тому

      i would think this is useful for offloading (sharing work), having more than 1 esp32 to do tasks, for example one could be used for motor control and one for balancing calculations, feeding data back to a central esp32, think of a robot dog (although there probably isnt enough power with the esp32), this way you technically increase the processing power by offloading work to other esp32's

  • @krissutikno2136
    @krissutikno2136 Місяць тому

    But where location thats file?

    • @AndreasSpiess
      @AndreasSpiess  23 дні тому

      I do not understand your question :-(

    • @krissutikno2136
      @krissutikno2136 22 дні тому

      @@AndreasSpiess thanks, now already solved, last i can't found hardwareserial. cpp on my hardisk 😁, and i can't install that library, anyways thanks a lot🙏

  • @ruegalfonso
    @ruegalfonso 4 роки тому

    very useful, very clear, enough speed but at the same time no too fast.
    Excellent. I subscribed

  • @shapathsust8948
    @shapathsust8948 7 років тому

    Sir I am new in esp32 and arduno .i want communicate arduno mega to esp32 serialy.what can ido?

    • @AndreasSpiess
      @AndreasSpiess  7 років тому

      You have to connect the two serial connections and use serial.print() on one board and Serial.read() on the other.

  • @Mobeone
    @Mobeone 7 років тому

    Another great video Andreas. Please keep them coming! By the way, will you be testing the ESP32's CAN bus interface at any point?

    • @AndreasSpiess
      @AndreasSpiess  7 років тому

      I do not know for the moment. It has no high priority for me.

  • @victorlabracaceres7947
    @victorlabracaceres7947 5 років тому

    no me funciono tengo esp32 con 38 pines

  • @AlexandreLeone
    @AlexandreLeone 7 років тому

    Andreas the Legend! I wish I could be able to communicate so complicated things in such an easy way. The underground room explain a lot of the way you see the world today. I'll always remember this tour, Andreas. Hopefully it will make me a better human being as it, for sure, does for you! Danke's a lot! 😘

    • @AndreasSpiess
      @AndreasSpiess  7 років тому

      Thank you for your compliment. I appreciate it!

  • @tawsifbit
    @tawsifbit 7 років тому

    Everytime I am trying to solve a problem you already have a solution you are like angel helping me out...thank you so much...😊

    • @AndreasSpiess
      @AndreasSpiess  7 років тому +1

      You are welcome. I am glad to help.

  • @gafotaku
    @gafotaku 4 роки тому

    You were just the solution for three days of search!! than you so much.

    • @AndreasSpiess
      @AndreasSpiess  4 роки тому

      You are welcome! If you subscribe you do not need to search next time ;-)

  • @DamienWise
    @DamienWise 7 років тому

    This is a game-changer -- you can use one serial port for your application, and use another to debug at the same time.

  • @klassichd10
    @klassichd10 7 років тому

    Great, thanks a lot! The lack of a second HW-Serial is one of the biggest disadvantages of the ESP8266

    • @AndreasSpiess
      @AndreasSpiess  7 років тому

      This is why I was disappointed at the beginning...

  • @MagivaIT
    @MagivaIT 5 років тому

    great video.... so... is easytransfer.h useable with this method

  • @bruceedwards8003
    @bruceedwards8003 Рік тому

    I continue to enjoy your clear and concise videos. Thanks 😊

  • @mikehudson3620
    @mikehudson3620 7 років тому

    How did you implement flow control when you were a morse operator?

    • @AndreasSpiess
      @AndreasSpiess  7 років тому

      +Mike Hudson we stopped after a few words and the receiver either confirmed or asked what he did not understand. And we repeated

  • @javiercabesa7616
    @javiercabesa7616 Рік тому

    thank you!!

  • @distancelab2010
    @distancelab2010 7 років тому

    Awesome as usual. Thanks for the video. Very interesting.

  • @hamidrasyid1560
    @hamidrasyid1560 5 років тому

    hi, thanks for your tutorial, it's really helpful, but when I try this "extra" serial, my wifi performance from esp32 down, and cannot connect.. do you experiencing this?

    • @AndreasSpiess
      @AndreasSpiess  5 років тому

      No.

    • @hamidrasyid1560
      @hamidrasyid1560 5 років тому

      @@AndreasSpiess so any suggestion to check my this problem?

    • @hamidrasyid1560
      @hamidrasyid1560 5 років тому

      @@AndreasSpiess can I have your email? so we can discuss furthermore

  • @scharlesworth93
    @scharlesworth93 6 років тому

    Helpful man I was wondering how to do this.

  • @joska9744
    @joska9744 3 роки тому

    a very interesting video for me!! Thank you!

  • @danielalencar4491
    @danielalencar4491 5 місяців тому

    Sou seu fã

  • @AbiChess.tricks
    @AbiChess.tricks 6 років тому

    So efficiently we can use only 2 Uart for our purpose apart from programming am I right?

    • @AndreasSpiess
      @AndreasSpiess  6 років тому

      I am not sure what you mean. You can only use 2 if you do not want to change the library.

    • @AbiChess.tricks
      @AbiChess.tricks 6 років тому

      Andreas Spiess if I didn’t change the library then I can use only two Uart even in that one goes to programming memory am I right so finally I can use only one

    • @AndreasSpiess
      @AndreasSpiess  6 років тому

      You can use 2 UARTs on the ESP32 without changing the library.

  • @reanimationxp
    @reanimationxp 6 років тому

    Just saved my project's butt Andreas. Thank you.

    • @AndreasSpiess
      @AndreasSpiess  6 років тому

      Glad to read that!

    • @reanimationxp
      @reanimationxp 6 років тому

      I owe you, you're a fantastic person. I think you're gonna be my first Patreon sub, you earned it.

  • @philliptoone
    @philliptoone 5 років тому

    2:45 Is this "secret" UART using any arbitrary GPIO pin a software or hardware UART?

    • @AndreasSpiess
      @AndreasSpiess  5 років тому

      I do not understand what you mean.

    • @philliptoone
      @philliptoone 5 років тому

      @@AndreasSpiess I believe the Arduino will allow you to use any pin for UART by implementing the UART through a serial library rather than the hardware that is built into the chip for specific pins. Is that what you are doing here or does the ESP32 allow for hardware UART on any pin?

    • @paulcgn
      @paulcgn 5 років тому +1

      @@philliptoone AFAIK the ESP32 has remappable PINs, thus it should still be hardware UART (see Chapter 4.2 and 4.3 Peripheral Output via GPIO Matrix in www.espressif.com/sites/default/files/documentation/esp32_technical_reference_manual_en.pdf)

  • @LL-cl7ct
    @LL-cl7ct Рік тому

    Thanks

  • @MrAlekoy
    @MrAlekoy 7 років тому

    is it possible to run one of the ports in 1200baud, 8n2? I have a meter I want to connect to that has those parameters..

    • @stryk187
      @stryk187 7 років тому

      I believe the baud rates on these microcontrollers are configurable. In the setup code: Serial.begin(115200) change to Serial.begin(1200) to specify 1200 baud (after checking the datasheet specs to make sure 1200 baud is supported, of course)

    • @MikeKranidis
      @MikeKranidis 7 років тому

      stryk187 he wants non parity, also 2 stop bits ( aka 8n2 ). That is not so easy or common...

    • @MrAlekoy
      @MrAlekoy 7 років тому

      Correct, the teensy does it, and I have tested most of my code on one, so I know that I can get the data I want from my power meter.
      I probably have to use the teensy to gather data from the meter, and pass it on to an ESP to send MQTT or modbus over to my node red or openhab server.