Serout of numbers for the ASCII characters ??? or HSerout ...

SolidWorksMagi

Senior Member
Hi,

I am working on a project that I need to send data like this out to a SpeakJet chip:

\0RX\011J 0NX\012J 0NX\013J 0NX\014J 0NX\015J 0NX\00J 88NX\01J 0NX\02J 0NX\03J 0NX\04J 0NX\05J 0NX\06J 0NX\07J 96NX\08J 0NX

Just plugging that line into a Serout command doesn't seem to work ... the editor say's the "\" is an illegal character.

I'm thinking if I can send the decimal equivalent somehow I can make this project work.

What I'm doing is putting the SpeakJet into Synthesizer mode so it will just make simple sine wave tones, like for Morse code or simple musical notes.
 

papaof2

Senior Member
See if there is any info here:
 

Aries

New Member
If you want to send the ASCII characters, then they need to be enclosed in double quotes - e.g.
"\0RX\011J 0NX\012J 0NX\013J 0NX\014J 0NX\015J 0NX\00J 88NX\01J 0NX\02J 0NX\03J 0NX\04J 0NX\05J 0NX\06J 0NX\07J 96NX\08J 0NX "

I assume the \0 is the "escaped zero" familiar to C programmers, meaning you want to send the decimal zero, not the ASCII string "\0". To do that, simply replace each occurrence with ",0," as ...

0,"RX",0,"11J 0NX",0,"12J 0NX",0,"13J 0NX",0,"14J 0NX",0,"15J 0NX",0,"0J 88NX",0,"1J 0NX",0,"2J 0NX",0,"3J 0NX",0,"4J 0NX",0,"5J 0NX",0,"6J 0NX",0,"7J 96NX",0,"8J 0NX
 

SolidWorksMagi

Senior Member
Hi,

Thanks, I forgot about the "" around the data. It's been awhile since I did any PICAXE programming and I'm just doing some initial tests for a vintage Altair 8800 computer project.

.
 
Top