arduino uno and serial monitor

Hello, currently i am doing some project on my arduino uno. this is my code

#include <SoftwareSerial.h>
#include <Arduino.h>
#include <Process.h>


#define rxPin 8
#define txPin 7

int i,j  = 0;
char keluar;
static float sinus[82] = {0.30, 0.309,
 0.343197874249694, 0.384400939062846, 0.461905993923551, 0.560204401325890,
0.684265918019988,0.839150794568802, 1.02942436653607, 1.25839521514189, 1.52724519627557,
1.83416942748242,
 2.17368413631743, 2.53627590481109, 2.90854546283357, 3.27393787562705,
3.61405425392097,
 3.91042481837866, 4.14651470031515, 4.30966016296969, 4.39261638993182,
4.39444819752844,
 4.32060470439976, 4.18216490843141, 3.99439004156850, 3.77483642146284,
3.54134382903815,
 3.31020900786610, 3.09478858752636, 2.90467126467604, 2.74544298297451,
2.61896749381334,
 2.52403664061909, 2.45721745978877, 2.41373339815717, 2.38825364241363,
2.37551362341457,
 2.37073814256284, 2.36987708949910, 2.37868809543809, 2.3771077022020,
2.37017638313887,
 2.36, 2.3508916744685, 2.33610489079096, 2.31442197788337,
2.28669207072608,
2.25295111068355,
 2.21336868604295, 2.16821195997129, 2.11782032042736, 2.06258739712224,
2.00294785080192,
 1.93936710105178, 1.87233279619999, 1.80234730582211, 1.72992084383457,
1.65556503888333,
 1.57978689226689, 1.50308313055404, 1.42593499158659, 1.34880349307597,
1.27212523161338,
 1.19630875210356, 1.12173151660398, 1.04873748915605, 0.977635340523582,
0.908697264477791,
 0.842158385828631, 0.778216730102938, 0.717033715824291, 0.658735122901961,
0.603412484771416,
 0.551124847678477, 0.501900837846108, 0.455740976146467, 0.412620180222470,
0.372490395632385,
 0.335283300372203, 0.310913030890299, 0.303, 0.301};
float d[82],dd[82],ddd[82];
float A,B,C,D,E,VA; //parameter" & VA
int jA,jB,jC,jD,jE; //waktu dari tiap parameter
int CT,tDiastol; 
float hasil,selisih;
float tes = 0;
int index = 0;
int led = 13;
String inbyteS;
char inbyte;
char inbyteC[4];
int inbyteint;
char a = 'a';
char b ='b';
char c ='c';
int stiff, systol, aug, framingharm, vaso, VAhasil, aughasil, stiffhasil, vasohasil, framhasil, systolhasil = 0;
String hasilkombinasi = "";
int kombinasi = 0;

SoftwareSerial bluetooth(rxPin, txPin); // RX, TX
char myChar ; 

void setup() {
  pinMode(13, OUTPUT);
  
  Serial.begin(9600);   
  Serial.println("Serial is beginning!");

  bluetooth.begin(9600);
  Serial.println("bluetooth is also beginning");
  bluetooth.println('#a~');
  bluetooth.println('#b~');
  bluetooth.println('#c~');
  bluetooth.flush();
}

void loop(){
  receivedAndroidValues();
  delay(1000);
  Serial.print("VA: ");Serial.println(VA);
  Serial.print("myChar: ");Serial.println(tes);
  selisih = VA - tes;
  delay(1000);
  hitung();
  delay(2000);
  sendAndroidValues();
  delay(3500);
  
}

void hitung(){
  
 digitalWrite(13, sinus[i]) ; // write the selected waveform on DAC0
  
d[i]=(sinus[i]-sinus[i-1])/0.3;
 dd[i]=(d[i]-d[i-1])/0.3;
 ddd[i]=(dd[i]-dd[i-1])/0.3;
//======================MEMBATASI NILAI SINYAL================//
 d[0]=0;dd[0]=0;ddd[0]=0;
//=================MASUKKAN FORMULA========================//
 A=dd[jA];B=dd[jB];C=max(dd[jC],0);D=min(dd[jD],0);E=max(dd[jE],0);
 VA=(45.5*(B-C-D-E)/A)+65.9;
 Serial.print(" A=");Serial.print(A);
 Serial.print(" B=");Serial.print(B);
 Serial.print(" C=");Serial.print(C);
 Serial.print(" D=");Serial.print(D);
 Serial.print(" E=");Serial.print(E);
 
 Serial.print("----->>>>MAKA NILAI VA=");Serial.print(VA);
 Serial.print(", stiffness=");Serial.print(stiff);
 Serial.print(", augmentation=");Serial.print(aug);
 Serial.print(", vaso=");Serial.print(vaso);
 Serial.print(", framinharm=");Serial.print(framingharm);
 Serial.print(", systol=");Serial.print(systol);
 Serial.print("---->>hasil = ");Serial.println(selisih);
 //Serial.print(">>yang dikirim ke bluetooth :");Serial.print(keluar);
 delay(1000);
 //Serial.print(d[i]);

 Serial.println();
 i++;
 if(i == 82) // Reset the counter to repeat the wave
 i = 0;
/*===============BATAS SISTOL DAN DIASTOL=====================*/
for (j=1;j<=39;j++)
 {
 if (d[j-1]>0 && d[j]<=0)
 {CT=j;break;} //waktu sistol
 }
//---------------
 int x=CT+1;
for (j=x;j<=60;j++) //iterasi dari sistol or Crest time
 {
 if (d[j-1]>=0 && d[j]<=0)
 {tDiastol=j;break;}
 }
/*===================ANALISIS SINYAL===========================*/
 for (j=1;j<=CT;j++)
{
if (dd[j-2]<dd[j-1] && dd[j]<dd[j-1] && dd[j]>0)
 {jA=j-1;break;}
}
//---------------
for (j=jA;j<=CT;j++)
{
if (dd[j-2]>dd[j-1] && dd[j]>dd[j-1] && dd[j]<0)
 {jB=j-1;break;}
}
//----------------
for (j=jD;j>x;j--)
{
if (dd[j+2]<dd[j+1] && dd[j]<dd[j+1] && j<jD-1)
 {jC=j+1;break;}
}
//----------------
for (j=jE;j>x;j--)
{
 if (dd[j+2]>dd[j+1] && dd[j]>dd[j+1] && j<jE-1)
 {jD=j+1;break;}
}
//----------------
for (j=tDiastol;j>x;j--) //iterasi dari sistol or Crest time
{
 if (dd[j+2]<dd[j+1] && dd[j]<dd[j+1])
 {jE=j+1;break;}
}
/*============================================*/
 //bluetooth.flush();
 //Serial.flush();
 delay(10); // Hold the sample value for 10 ms  delay(100);
  
}
//--------------------------------------------//
  
  


void sendAndroidValues(){
 // if(bluetooth.available() > 0){
  if (abs(selisih) > 100){
    //bluetooth.print('#a~');
    Serial.print("yang dikirim ke bluetooth --> ");Serial.println(a);
    bluetooth.print('#');
    bluetooth.print('a');
    bluetooth.print('~');
    //Serial.println('#');
    //Serial.println('a');
    //Serial.println('~');
    char keluar = 'a';
    digitalWrite(13, HIGH);
    digitalWrite(12, LOW);
    digitalWrite(11, LOW);
    bluetooth.flush();
  } else if (abs(selisih) < 100 && abs(selisih) > 50){
    //bluetooth.print('#b~');
    Serial.print("yang dikirim ke bluetooth --> ");Serial.println(b);
    bluetooth.print('#');
    bluetooth.print('b');
    bluetooth.print('~');
    //Serial.println('#');
    //Serial.println('b');
    //Serial.println('~');
    char keluar = 'b';
    digitalWrite(13, LOW);
    digitalWrite(12, HIGH);
    digitalWrite(11, LOW);
    bluetooth.flush();
  } else if (abs(selisih) < 50 || abs(selisih) == 0){
    //bluetooth.print('#c~');
    Serial.print("yang dikirim ke bluetooth --> ");Serial.println(c);
    bluetooth.print('#');
    bluetooth.print('c');
    bluetooth.print('~');
    //Serial.println('#');
    //Serial.println('c');
    //Serial.println('~');
    char keluar = 'c';
    digitalWrite(13, HIGH);
    digitalWrite(12, HIGH);
    digitalWrite(11, LOW);
    bluetooth.flush();
  }
  //}
  
 // while(Serial.available()){
 // char myChar = Serial.read();
 // bluetooth.print(myChar);
  //}
}

void receivedAndroidValues(){
 char buffer[] = {' ',' ',' ',' ',' ',' ',' '};
 while(bluetooth.available()){
    bluetooth.readBytesUntil('n',buffer,7);
    digitalWrite(led, HIGH);
    delay(500);
    digitalWrite(led, LOW);
    delay(500);
    digitalWrite(led, HIGH);
    delay(500);
    digitalWrite(led, LOW);
    delay(500);
    
    volatile int myChar = atoi(buffer);
    Serial.print("serial yang diterima = ");Serial.println(myChar);
    delay(100);
    tes = myChar;
 }
}

currently i want to print serial along side with bluetooth . at first, everything is alright.
but since i add another serial print like

 Serial.print(", stiffness=");Serial.print(stiff);
 Serial.print(", augmentation=");Serial.print(aug);
 Serial.print(", vaso=");Serial.print(vaso);
 Serial.print(", framinharm=");Serial.print(framingharm);
 Serial.print(", systol=");Serial.print(systol);
 Serial.print("---->>hasil = ");Serial.println(selisih);

my serial monitor dont give any result, at first i try to add some delay between them, some of them is appearing, some of them are cut off and go back to Serial.print in void setup like “Serial is beginning” and “bluetooth is beginning”. Float values in the beginning of the code is simulation of wave-like sine that needed in simulation, dont mind them.

any idea to fix this?

thanks before

best regards

but since i add another serial print like

Unless you have the super-secret Arduino that runs an operating system and has two terabytes of memory, you are running out of memory. The simplest thing to do is to learn about the F() macro.

Serial.print(F(", stiffness="));

Keep those string literals out of SRAM.