Reading entire words with serin?

jledger

New Member
I'm presently using the following:

serin 1,n1200,b1

which will read in a single number/alpha from the serial port. Can someone show me an example of how one could receive an entire word or phrase in this matter? Is there something along the lines of a BASIC input statement in the picaxe?

Thanks
Jeff
 

womai

Senior Member
The Picaxe basic does not know strings. But you can read several characters at once, each put into a separate byte variable. Clearly this limits you to a maximum of 14 characters. You could then store them in RAM (using peek/poke) and read some more. To read e.g. 3 characters at once, use

serin 1,n1200,b1,b2,b3

Wolfgang
 
Top