Shop OBEX P1 Docs P2 Docs Learn Events
BS2sx and Handspring(Palm Pilot) — Parallax Forums

BS2sx and Handspring(Palm Pilot)

ArchiverArchiver Posts: 46,084
edited 2000-05-21 18:04 in General Discussion
Hey all,
After scanning through the archives I noticed some people were
successful in connecting their stamps to their palm pilots. Well
after slapping some code together and the basic wiring I am
unsuccessful so far.
So to those who have been successful, did you have do to any
additional cicuitry than just connecting the TX, RX, and gnd lines to
their respecitve places? Did you use PocketC ver 3.7 (like me) or
other software for the Palm? Also, any other things you wish to
share
:-)

Thanks,
Lars

P.S. For those who are interested here is the code I used:
For the Basic Stamp 2 sx:
'Serial I/O test

'Constants
RX con 1
TX con 2
BAUD con 16624 'for 9600
R_LED con 8 ' Pin for the right LED
L_LED con 7 ' Pin for the left LED

'Variables
serData var byte

main:
low R_LED
low L_LED

Serin RX, BAUD, [noparse][[/noparse]DEC serData]
high R_LED 'Recieved the data -> turn on right led
if serData = 1 then light 'The data is 1 -> turn on left led
pause 500
goto main

light:
high L_LED
pause 500
goto main

Code for handspring using PocketC ver3.7:
// Serial test

main ()
{
string message;

if (seropen(9600, "8N1N", 10000) == 0)
{
message = "Opened ";
if (sersend('1') == 0)
message = message + "Sent ";
else
message = message + "Fiailed Send ";
}
else
{
message = "Failed to Open";
}
sleep(5);
serclose();
alert(message);
}

It says is is opened and sent but none of the lights light up on the
stamp. So I guess it must be my wiring or the software.
Sign In or Register to comment.