STR & array
Tumbler
Posts: 323
Hello
I want to·read my PINK IP address with this code, and output it to the debug window.
why i only see strange characters?
·
SEROUT TX, Baud, [noparse][[/noparse]"!NB0RSI"] GOSUB Getstring DEBUG "IP Address: ", STR nbvar\16,CR
I want to·read my PINK IP address with this code, and output it to the debug window.
why i only see strange characters?
·

Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
' {$STAMP BS2sx} RX PIN 14 ' Serial Receieve Pin --> PINK.TX TX PIN 15 ' Serial Transmit Pin --> PINK.RX Baud CON 240 ' 9600 bps (BS2sx) nbvar VAR Byte(16) ' PINK Data Variable Array Main: SEROUT TX, Baud, [noparse][[/noparse]"!NB0RSI"] GOSUB Getstring DEBUG "IP Address: ", STR nbvar\16,CR END Timeout: DEBUG "Communication Timeout!" ' Serial Timeout END Getstring: SERIN RX, Baud, [noparse][[/noparse]STR nbvar\16\CLS] RETURNPINK settings are correct. I don't see what's wrong here
DEBUG DEC nbvar(0),":",DEC nbvar(1),":",DEC nbvar(2),":",DEC nbvar(3), CR
shows the correct values, but as you can see at the screenshot, my pink has every second another ip address?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
every sx sample failed.
With a normal BS2 and PE all samples work.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
Just getting strange chars.
But it's ok, i use a bs2 now.
Thx