Blinking LED along with NRF24L01

I am using NRF24L01 with Arduino Pro Mini to send data. All my pins are wired and I want to blink the LED with RX (pin 1). Can I do this? Below is my code. I always remove connections while uploading code from FTDI.

#include <SPI.h>
#include "Arduino.h"
#include <avr/sleep.h>
#include <nRF24L01.h>
#include <RF24.h>
#include "LowPower.h"

RF24 radio(9, 10); // CE, CSN

const byte Surf1_address[6] = {'1' , 'P' , '0' , '1' , '1'};
#define BAUDRATE 115200
int jL, jR, ang, drive_sp, AM, AC, FR, arm_sp, ES, AL, AR, Aup, Alo, TRun, PA;
int n = 15;
int a[15];
int A[15];
//int digitalPins = 11;
int ar = 2, al = 3, am = 4, fr = 5, ac = 6, aup = 7, es = 8, alo = A2, pa = A0, trun = A1;

#define wakePin1 2
#define wakePin2 3
#define ledPin 1

unsigned long lastMillis = 0;
const long interval_1 = 1000;
const long interval_2 = 180000;
unsigned long currentTime1 = 0;
extern volatile unsigned long timer0_millis;
unsigned long new_value = 0;

void setup()
{
  //  Serial.begin(9600);
  radio.begin();
  radio.openWritingPipe(Surf1_address);
  radio.setAutoAck(false);
  radio.setDataRate(RF24_250KBPS);
  radio.setPALevel(RF24_PA_LOW);
  radio.stopListening();


//  pinMode(di, INPUT_PULLUP);
  //  pinMode(store,INPUT_PULLUP);
  pinMode(ar, INPUT_PULLUP);
  pinMode(al, INPUT_PULLUP);
  pinMode(am, INPUT_PULLUP);
  pinMode(fr, INPUT_PULLUP);
  pinMode(ac, INPUT_PULLUP);
  pinMode(aup, INPUT_PULLUP);
  pinMode(es, INPUT_PULLUP);
  pinMode(alo, INPUT_PULLUP);
  pinMode(pa, INPUT_PULLUP);
  pinMode(trun, INPUT_PULLUP);

  pinMode(wakePin1, INPUT_PULLUP);
  pinMode(wakePin2, INPUT_PULLUP);
  digitalWrite(ledPin, LOW);
  pinMode(ledPin, OUTPUT);
}

void loop() {
  doBlink();

  Read();
  make_array( A, n );
  send_data();
  p_array();
  {
    if ((jL >= 500 && jL <= 550) && (jR >= 500 && jR <= 550) && (AC == 1) && (AM == 1) && (AR == 1) && (AL == 1) && (Aup == 1) && (Alo == 1) && (PA == 1)) {
      Sleep_Mode();
    }
    else
      setMillis(new_value);
  }
}

void Read() {
  PA = digitalRead(A0); // Type Feed
  TRun = digitalRead(A1); // Test Run
  Alo = digitalRead(A2); // Arm low
  jR = analogRead(A3); // Right Joystick / Motor
  jL = analogRead(A4); // Left Joystick / Motor
  drive_sp = analogRead(A5); // Drive Speed
  arm_sp = analogRead(A6);   // Arm Speed
  ang = analogRead(A7);  //ang - Angle Control
//  DI = digitalRead(0); // Momentary Direction change
  AR = digitalRead(2); // ARM Right
  AL = digitalRead(3); // ARM Left
  AM = digitalRead(4); // Auto/Manual
  FR = digitalRead(5); // FWD/REV
  AC = digitalRead(6); // Arm Control
  Aup = digitalRead(7); // Arm Up
  ES = digitalRead(8); // Emmergency Switch
}
void make_array(int a[], int n)
{ int c = 0;
  while (c < n)
  { for (int i = 0; i < 1; i++)
    { a[0] = jL; a[1] = jR; a[2] = ang; a[3] = drive_sp;
      a[4] = arm_sp; a[5] = AC; a[6] = FR; a[7] = AM;
      a[8] = ES; a[9] = AL; a[10] = AR;
      a[11] = Aup;  a[12] = Alo; a[13] = TRun;
      a[14] = PA;
    }
    break;
  }
}
void send_data()
{
  radio.write( A , sizeof(A) );
}


void Sleep_Mode() {
  {
    unsigned long currentTime1 = millis();
    if ((currentTime1 - lastMillis) > interval_2) {
      attachInterrupt(0, wakePin1, LOW);
      attachInterrupt(1, wakePin2, LOW);
      LowPower.powerDown(SLEEP_FOREVER, ADC_OFF, BOD_OFF);
      detachInterrupt(0);
      detachInterrupt(1);
      lastMillis = millis();
    }
  }
}

void setMillis(unsigned long new_millis) {
  uint8_t oldSREG = SREG;
  cli();
  timer0_millis = new_millis;
  SREG = oldSREG;
}

void doBlink() {
  unsigned long currentMillis = millis();
  if ((currentMillis - lastMillis) >= interval_1) {
    digitalWrite(ledPin, HIGH);
    delay(10);
    lastMillis = currentMillis;
    digitalWrite(ledPin, LOW);
  }
}

void p_array()
{
  Serial.print("Values transmitted are : ");
  for (int i = 0 ; i < n ; i++ )
  {
    Serial.print(" | ");
    Serial.print(A[i]);
  }
  Serial.print(" | "); Serial.println();
}

What happens when you run the sketch ?

Might be time to think about getting a bigger boat...or port expander.

It doesn't blink but NRF transmit data.

This is the last resort. But there are innovators who can help.

void doBlink() {
  unsigned long currentMillis = millis();
  if ((currentMillis - lastMillis) >= interval_1) {
    digitalWrite(ledPin, HIGH);
    delay(10);
    lastMillis = currentMillis;
    digitalWrite(ledPin, LOW);
  }
}

what happens when you extend the delay time to 1000 second

If it is blinking then the LED is only on for 10 milliseconds. Would you even notice that ?

Sorry, it was my mistake. My room was filled with sunlight. I was not able to distinguish whether it was glowing or not.
It is glowing continuously but not blinking even after giving 1 second delay

Not how to gain helpers.

Probably connected incorrectly. Show a drawing and a picture.

You are using Pin 2, Pin 3 for two things (left arm, right arm, wake1 and wake2)... and Pin 1 , depending on your Arduino, (you have a Nano) will interfere with USB communications... and your LED.

int ar = 2, al = 3, am = 4, fr = 5, ac = 6, aup = 7, es = 8, alo = A2, pa = A0, trun = A1;

#define wakePin1 2
#define wakePin2 3
#define ledPin 1

You put pin names where the ISR should be...

      attachInterrupt(0, wakePin1, LOW);
      attachInterrupt(1, wakePin2, LOW);

This is your function loop like posted in post #1

What your code is doing is executing your function doBlink();
when ever your Arduino pro micro is "awake" = not sleeping

What your function doBlink is doing is
once every second switch IO-pin 1 HIGH for 10 milliseconds
then switch low again.

though IO-pin 1 is used for serial transmitting at the same time
what might works is using a operational amplifier chip like an MCP6042
https://www.mouser.de/ProductDetail/Microchip-Technology/MCP6042-E-P?qs=MvcPkWSywowxarV%2FCKQAcQ%3D%3D
wired as a voltage-follower.

An LED draws a current 5 mA to 20 mA. Which will have an impact on the serial inetrface.
the input-resistance of an OpAmp-voltage-follower is minimum 10 MOhm high which means the current is supertiny 5V / 10000000 Ohm = 0.5 microampere = 0.0000005 A
which has no practical effect on the serial connection.
The led is then connected between to the output of the OpAmp and a 330 Ohm-resistor towards ground

best regards Stefan

But it is working.

Thanks for guidance. will implement.

Schematic_Remote_LoRA_2024-05-07.pdf (82.5 KB)
Incorporated your suggestion in new PCB design.
Thanks & Regards