I want it "Hello" to display on line one and "world" line 2

#include <SoftwareSerial.h>
SoftwareSerial mySerial(3,1);

void setup()
{
mySerial.begin(9600);
delay (10000);
pinMode(7,OUTPUT);

}

void loop ()
{
digitalWrite(7,HIGH);
delay (10000);

selectLineOne();

while(1);
}

void selectLineOne()
{

mySerial.write(254);
mySerial.write(128);
mySerial.write("Hello");

selectLineTwo();

}

void selectLineTwo()
{
mySerial.write(254);
mySerial.write(192);
mySerial.write("WORLD");
}

Without any information on what Is actually wrong it’s difficult to help.

However I see you are using write on serial for text. Try changing those calls to println EG:

mySerial.println(“hello”);

Are you intentionally writing unprintable characters 254 , 192 and 128? As above use print if you intend to send those number values to the remote.

Write can be used to send strings but it won’t send a new line. There could be other issues - please follow the guidelines given below and also tell us how the code doesn’t work.

OK, get with the program! :grinning:

Please go and read the instructions, then go back and modify your post using the "More --> Modify" option you will find to the bottom right of the post, to mark up the code (but it always needs to be the complete code) as such so we can examine it conveniently and accurately. Please do not post a ".ino" file as an attachment - that would mean that you are expecting people to actually load it to their IDE to look at it and that is extra unnecessary labour. In fact, attachments do not always show properly on different operating systems.

If you do not mark it up as code, whatever code you do post could well be garbled and is certainly anything but easy to read. Yours seems to have survived so far but I didn't look too closely.

Note: Also mark up any data - as a separate section - in the same way. This includes error output that you get from the IDE.

And - before you post any code, use "Auto Format" in the Tools menu of the IDE to properly present the code. You can then use the "copy for forum" function in order to paste it into a message with the "code" tags already provided.

Try and avoid unnecessary white space (blank lines). You should only use these to separate functional blocks of code.

@paul b

Does that include me? I did write one function call in there to aid understanding but checked carefully in preview that it formatted correctly.

One of the issues I have is I often answer forum posts like this from my iPhone and the editor interface seems to miss these options.
Maybe I am missing something and I’d be very glad to be corrected. Or even given a link to the direct markdown I could use.

Thanks,
Dave

davetcc:
Does that include me? I did write one function call in there to aid understanding but checked carefully in preview that it formatted correctly.

Not at all. It can be a bit tedious to mark up a single line of code although it does effectively highlight it. When you preview it, the box will look too big but as you see, it compacts in the final version.

The problem is that all "plain" text is passed through the interpreter so that "8 )" without the embedded space which is not uncommon in code, is embellished to "8)" and equally commonly "[ i ]" turns into the command to italicise all following. :astonished:

Full marks to you for understanding the obligation to use "Preview" to check that your post is meaningful.

davetcc:
One of the issues I have is I often answer forum posts like this from my iPhone and the editor interface seems to miss these options.

One frequent commentator, "Grumpy Mike" has some problems with dyslexia and homophones, made much worse by using an iPad and autocomplete. I get far too frustrated even to consider writing more than a single line or two on a tablet device, let alone a phone. :grinning:

davetcc:
Maybe I am missing something and I’d be very glad to be corrected. Or even given a link to the direct markdown I could use.

It's called "BBcode"