Break line Serial Monitor PLEASE HELP PLEASE

I made an app with mit inventor , it has a slider. the values are like
656361595755 when moving from 65 to 55 , so I want the serial monitor to break its line after every 2 digits. how do I do that ?? Please help :frowning:

edit : in the Code :

void loop() {
while(Serial.available()) {
delay(25);
char c=Serial.read();
if(c=='#')
{break; }
voice += c;
}

Print some spaces?
Use println?

nityoday:
Please help :frowning:

Please post your Arduino program.

...R
Serial Input Basics - simple reliable ways to receive data.

Robin2:
Please post your Arduino program.

...R
Serial Input Basics - simple reliable ways to receive data.

Here it is

void loop() {
while(Serial.available()) {
delay(25);
char c=Serial.read();
if(c=='#')
{break; }
voice += c;
}

I am a begginer and I don't know the meaning of these things..

nityoday:
I am a begginer and I don't know the meaning of these things..

Now is the best time to start learning.

And that can't be your complete program because it does not print anything to the Serial Monitor. In your Original Post you said "so I want the serial monitor to break its line after every 2 digits". Also, the code you posted in Reply #3 won't compile. Post the complete program in your next Reply.

Have a look at the examples in Serial Input Basics - simple reliable ways to receive data. The second example uses a linefeed character to identify the end of a message. I suspect your system is using the # character for that, and you could easily modify my example to use the # character.

...R

Robin2:
Now is the best time to start learning.

And that can't be your complete program because it does not print anything to the Serial Monitor. In your Original Post you said "so I want the serial monitor to break its line after every 2 digits". Also, the code you posted in Reply #3 won't compile. Post the complete program in your next Reply.

Have a look at the examples in Serial Input Basics - simple reliable ways to receive data. The second example uses a linefeed character to identify the end of a message. I suspect your system is using the # character for that, and you could easily modify my example to use the # character.

...R

Program :

void setup() {
Serial.begin(38400);

}

void loop() {
while(Serial.available()) {
delay(25);
char c=Serial.read();
if(c=='#')
{break; }
voice += c;
}
}

Actually I want that slider values so that I can Dim my LED's with bluetooth .

The screenshot of the Slider Position in MIT App Inventor > Imgur: The magic of the Internet

The screen shot of serial monitor > https://imgur.com/1byI82D

I think it would so is each pair separated by the '#' character or are you getting an non-delimited stream?

getting the delimiter for each pair of characters may be easier, IMHO.

nityoday:
Program :

Oh No it's not ...

Because when I tried to compile it I got this error (as I expected)

ArduinoTemp.ino: In function 'void loop()':
ArduinoTemp.ino:13:5: error: 'voice' was not declared in this scope
Error compiling.

If you really want help stop messing about.

...R

Robin2:
Oh No it's not ...

Because when I tried to compile it I got this error (as I expected)

ArduinoTemp.ino: In function 'void loop()':

ArduinoTemp.ino:13:5: error: 'voice' was not declared in this scope
Error compiling.





If you really want help stop messing about.

...R

Sorry for that, I accidentally didn't copy the first line of the code...

And really thanks for helping, I Learnt it now...

Thanks for the update.

...R