Achieve two serial communications in Arduino

The project I wanted to realize needed 81 different situations.

However, Arduino realized that only one serial communication was possible. So I tried to achieve my goal with 1 insert, 1 insert, = 11 5 insert, and 5 insert = 55 insert, but it didn’t work out.

I checked the software cereal and other contents, but I’m asking because it seems different from the goal.

So to achieve two serial communications at Arduino, we programmed as follows: In serial communication, the LED lights up when 5 is inserted twice. But this part has not been resolved. Do you know anyone?

The coding contents are as follows.

// C++ code
int led = 0;

void setup()
pinMode(13, OUTPUT);

void FOCUSING(){
while (Serial.available()) {
char serialListner =;
led = 13;
if(serialListner == ‘5’){ // There is a problem here.
if(serialListner == ‘5’){
digitalWrite(13, HIGH);
delay(1000); // Wait for 1000 millisecond(s)
digitalWrite(13, LOW);
delay(1000); // Wait for 1000 millisecond(s)



void loop()

Draw like a picture and try to light Led on.

Thank you for your reference to the long contents.

do you mean, when two 5 is entered on the input, the LED should light up?

That double if is really an error. There is no delay command, remember, it’s important for the Arduino to process that, without that delay command, at the time the other if is executed, it might not get the second enter of 5 number.

Also, this is best if you will be providing me the link because I’m sure you are using the TinkerCAD simulator.