0

So I have a project that need ESP-01 (ESP8266) and Fingerprint Sensor (FM10A), both of it would be connected to Arduino UNO. Both of the component need to communicate from SoftwareSerial. For some project-related reason I can't use the hardware-serial.

The programs works like this:

  1. The fingerprint sensor is going to capture a fingerprint and give it an ID (String)
  2. The ID is going to be sent to firebase database using ESP-01

Is it possible to make them work using 2 SoftwareSerial?

ESP-01 Pins | Fingerprint Sensor FM10A Pins

Any helpful response would be appreciated, thank you!

Rickyslash
  • 51
  • 1
  • 8

2 Answers2

0

The ESP-01 (ESP8266)is only a WiFi module with 2 gpios available. It should be used together with a micro-controller board and not stand alone. Better is to get a micro-controller board like esp32.

GrooverFromHolland
  • 971
  • 1
  • 11
  • 18
  • Yes, I'm using Arduino UNO as microcontroller board. Is it possible to use 2 SoftwareSerial? – Rickyslash Sep 19 '22 at 07:50
  • SoftwareSerial library has the following known limitations: It cannot transmit and receive data at the same time. If using multiple software serial ports, only one can receive data at a time. If your project requires simultaneous data flows, see Paul Stoffregen's AltSoftSerial library. – GrooverFromHolland Sep 19 '22 at 08:05
0

My answer is not a good answer: I am not sure.

You can certainly use 2 SoftwareSerial and make use of them with no problem but that library comes with limitations as per the official documentation

Quoting from what I've linked:

SoftwareSerial library has the following known limitations:

  • It cannot transmit and receive data at the same time.

  • If using multiple software serial ports, only one can receive data at a time.

  • Not all pins on the Mega and Mega 2560 boards support change interrupts, so only the following can be used for RX: 10, 11, 12, 13, 14, 15, 50, 51, 52, 53, A8 (62), A9 (63), A10 (64), A11 (65), A12 (66), A13 (67), A14 (68), A15 (69).

  • Not all pins on the Leonardo and Micro boards support change interrupts, so only the following can be used for RX: 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI).

  • On Arduino or Genuino 101 boards the current maximum RX speed is 57600bps.

  • On Arduino or Genuino 101 boards RX doesn't work on digital pin 13.

  • If your project requires simultaneous data flows, see Paul Stoffregen's AltSoftSerial library.

Of course this library was built for Arduino and you might have to deal with other stuff if you're planning on to program the ESP8266.

I also remember having to deal with extra noise when using the SoftwareSerial at some higher baud-rates. So keep that in mind!

Some random IT boy
  • 7,569
  • 2
  • 21
  • 47