Serial monitor not displaying correct angle values of joystick at the receiver.

I want to control a servo using a joystick. There is no problem with the joystick, I checked. The serial monitor in the transmitter arduino is showing me proper angles. But the serial monitor of the receiver is not showing me the proper angles. Instead it's showing as shown in the screenshot below.

Here is the transmitter code:

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
RF24 radio(7, 8); // CE, CSN
const byte address[6] = "00001";
void setup() 
{
  Serial.begin(9600);
  radio.begin();
  radio.openWritingPipe(address);
  radio.setPALevel(RF24_PA_MIN);
  radio.stopListening();
}
void loop() 
{
  const char text[] = "Hello World";
  radio.write(&text, sizeof(text));
  delay(1000);

  
  int potValue=analogRead(A2);
  int angleValue=map(potValue,0,1023,0,180);
  radio.write(&angleValue,sizeof(angleValue));
  Serial.println(angleValue);
}

Here is the receiver code:

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
RF24 radio(7, 8); // CE, CSN
const byte address[6] = "00001";
void setup() 
{
  Serial.begin(9600);
  radio.begin();
  radio.openReadingPipe(0, address);
  radio.setPALevel(RF24_PA_MIN);
  radio.startListening();
}
void loop()
{
  if (radio.available())
  {
    //delay(5);
    char text[32] = "";
    radio.read(&text, sizeof(text));
    Serial.println(text);

    
    int angleValue=0;
    radio.read(&angleValue,sizeof(angleValue));
    Serial.println(angleValue);
    delay(5);
  }
}

Here is the screenshot:

Could anyone tell me where I am going wrong?

Where is the screenshot?

Have a look at this Simple nRF24L01+ Tutorial.

Wireless problems can be very difficult to debug so get the wireless part working on its own before you start adding any other features.

The examples are as simple as I could make them and they have worked for other Forum members. If you get stuck it will be easier to help with code that I am familiar with. Start by getting the first example to work

...R

I guess @paulsk97 was too lazy to attach the screenshot when they did this copy/paste crosspost. Here's the image attached to their original thread:


@paulsk97, do not cross-post. Other thread removed.

Thanks Coding Badly!

It looks like the attachment from the original thread was deleted when the thread was removed so my embedded image above broke. I suspected that was going to happen but I was too lazy to download and then attach the image here. @paulsk97 will just need to attach it to this thread.

pert:
It looks like the attachment from the original thread was deleted when the thread was removed so my embedded image above broke.

Thank you for mentioning that. The image is visible for the moderators so I had no idea it was not working.

I'll get that fixed.