• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

UART or SPI reception for ESP32

Q&A Forum › Category: ESP32 › UART or SPI reception for ESP32
0 Vote Up Vote Down
Ant Williams asked 3 years ago

Hi peeps,
 
I’m brand new here, having joined to see how to solve how to configure my ESP32 to receive data from an external device outputting either SPI or UART data (either – I don’t mind).
I have not been able to locate an example of this anywhere.
Any tips?

Question Tags: reception, RX, SPI, UART
6 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Hi.
 
I think this is one of the simplest examples showing how to read data via serial on the ESP32: https://www.programmingboss.com/2021/04/esp32-arduino-serial-communication-with-code.html
 
The data is being sent from an Arduino, but it can be any other device.
 
I hope this helps.
Regards,
Sara

0 Vote Up Vote Down
Ant Williams answered 3 years ago

Thanks Sara,
That simple! I’m so used to lower level embedded programming, that I have been hung up on “how do I configure interrupts to read the incoming stream byte-by-byte whilst building a string”, etc.etc., forgetting that the Arduino environment handles that at an abstract level for us!
I’ll give this a whirl when I get home this evening :).
Much appreciated.

0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Great! 
Let me know if you succeed.
Regards,
Sara

0 Vote Up Vote Down
Ant Williams answered 3 years ago

No luck – but it is a hardware thing I think.
The ESP32 I bought was the DUINOTECH ESP32 from a supplier called JAYCAR who stock ARDUINO-ready modules.
On careful inspection (hours of research) I discovered it has only ONE serial port…. which is shared between GPIO1/3 AND the USB serial monitor. I scoped it and all serial signals appear in both places all the time.
So it seems this ESP module cannot provide a serial port while it is busy being debugged from ARDUINO.
I’m really disappointed – a big hold up now, while I try to source a proper module!

0 Vote Up Vote Down
Steve Mercer answered 3 years ago

You could just use the https://github.com/plerup/espsoftwareserial library.

0 Vote Up Vote Down
Ant Williams answered 3 years ago

Thanks Steve – I wondered about that, and will look into it. Much appreciated!

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.

      Notifications