Message in variable

Vroom

Member
Make a message short code into variable for LCD. I typed code got error like start B1 = "hello" for serout, but got error, I saw in Posts something like same that so I cant remember where. Shown example;

b1 = "hello"

main:
pasue 500
serout 1 , N2400, (b1)
goto main

But got error in program, Am I wrong? Also Symbol Hello = b1 simulate run got still nothing Serial Output Buffer. Maybe hardware should be fine no matter software simulate run got nothing output buffer?
 

Dippy

Moderator
For the first part: Yes, you are wrong.
b1 is a single byte variable.
It can hold a single ASCII value, for example.
It cannot hold a string. Have a read of Manual 1.

If you want a number of text strings to send to LCD then many people suggest storing the strings in EEPROM and then read/write-to-LCD in a loop.

I'm very sorry, I cannot understand your final question.
Please post again using your First language. We have a number of people here who are multilingual.
 

Vroom

Member
Right, yeah should use EEPROM and then read/write to LCD in a loop, I already ordered a EEPROM and then wait get it soon then I will more practice with EEPROM for LCD I need lots of text message to be shown into a LCD and more space own code in PICAXE.





Very sorry I should ask someone's translate first I'm almost totally forget, next time I will do, Lol.
 
Last edited:

westaust55

Moderator
When you use:
Symbol Hello = b1​

yoiu are assigning an alias (alternative name) to variable b1.
it is not assigning an ASCII string to variable b1
 

SAborn

Senior Member
You dont say what picaxe you are using but in most cases when it is quoted to write to eeprom we are referring to the eeprom within the picaxe and not an extrenal eeprom.

In many cases the picaxe eeprom is shared memory space with the program and you may have limited eeprom space to use.

A simple hello wont take up much eeprom space.
 

BeanieBots

Moderator
Vroom, please take note of the comments made by SAborn.
If you are thinking of using external EEPROM, how are you intending to get your messages into it?
Don't forget, every single character of your message is a byte of program space used and space is not a PICAXE strong point.
You might need to consider a special program to populate the EEPROM before using it in your main program.
 
Top