ive been messing with this code, and ive been having so trouble displaying whats being stored in 'inChar' correctly. so if i typed in "hello" on my phone and sent it via Bluetooth. i want the ardunio to display "hello" on the serial monitor. currently i can only get it to display 1 character at a time (displaying vertically)
char inChar;
char inData[24]; // Use whatever size you need
byte index = 0;
void loop()
{
while(Serial.available() > 0)
{
inChar = Serial.read();
if(index < 22)
{
inData[index++] = inChar;
inData[index] = '\0';
}
Serial.print(inChar);
}
// Use the data in inData, then reset
inData[0] = '\0';
index = 0;
}