PINK programming problem
I'm having a problem reading and writing vars to/from the PINK netburner.
I can see the device using the IPsetup program and I can display the web page and change values
and read them back. Everything seems fine.
However, when I run the sample program, PINKTestV1.0, I am unable to successfully read and write to the web variables.
I get the "failure" message because the data read back from the PINK doesn't match the data that is written.
If I read the same variable repeatedly in a loop the data comes back as 255,0,255,0.
(changing from 255 to 0 to 255 on each successive read)
I've tried different pins for RX/TX but no luck. If I disconnect one of the connections
between the stamp (bs2pe) and the PINK module i get a comm error so i know
that i'm connecting it correctly.
Anyone have any ideas as to what's wrong?
I can see the device using the IPsetup program and I can display the web page and change values
and read them back. Everything seems fine.
However, when I run the sample program, PINKTestV1.0, I am unable to successfully read and write to the web variables.
I get the "failure" message because the data read back from the PINK doesn't match the data that is written.
If I read the same variable repeatedly in a loop the data comes back as 255,0,255,0.
(changing from 255 to 0 to 255 on each successive read)
I've tried different pins for RX/TX but no luck. If I disconnect one of the connections
between the stamp (bs2pe) and the PINK module i get a comm error so i know
that i'm connecting it correctly.
Anyone have any ideas as to what's wrong?

Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
A complex design is the sign of an inferior designer. - Jamie Hyneman, Myth Buster
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
TestBytes DATA $09, $55, $AA, $FF Main: DEBUG "Testing communication with PINK Module..." verify = 1 FOR index = 0 TO 3 ' Four Bytes SEROUT TX, Baud, [noparse][[/noparse]"!NB0RSI"] SERIN RX, Baud, [noparse][[/noparse]STR serStr\16\CLS] READ TestBytes + index, nbvar ' Fetch Next Test Byte SEROUT TX, Baud, [noparse][[/noparse]"!NB0W00:", nbvar, CLS] ' Send To PINK GP 00 SEROUT TX, Baud, [noparse][[/noparse]"!NB0R00"] ' Send Command To Read Variable SERIN RX, Baud, 2000, Timeout, [noparse][[/noparse]verify] ' Get One Byte With Timeout IF verify <> nbvar THEN Failure ' Check For Match NEXT DEBUG "PASSED!" END Failure: DEBUG "FAILED!" END Timeout: DEBUG "Failed!", CR, "Communication Timeout!"' Serial Timeout ENDI got it to work. The problem was that the ground wire was faulty.
I replaced it and everything worked fine. Only took me a whole
day to figure that one out. [noparse]:([/noparse]
Thanks anyway.
Glad to hear it's up and running! they are a lot of fun!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
A complex design is the sign of an inferior designer. - Jamie Hyneman, Myth Buster
Thanks everyone.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support