@SuperGops When you want to create a PWM signal, why don't you just useanalogWrite(dutycycle)
to just create your PWM? Is there any specific reason you are going for interrupts?
@rafitc99 I changed the buffer and that solved the problem. Thanks a lot for coming to my rescue.
@salmanfaris I did change the buffer size and everything is working perfectly. Thanks coming to my rescue.
I am using the hardware serial (pin 0 and 1 on Arduino Uno)
As @rafitc99 mentioned, you need to expand the Serila buffer, in the hardware serial also the Arduino board package implements a 64-byte ring buffer for send and receive on the hardware serial messages. So you need to change that to 256 as per your message length.
@rafitc99 The thing is that I am not using the SoftwareSerial library in receiving the message from the first microcontroller. I am using the hardware serial (pin 0 and 1 on Arduino Uno)