Serial Data from stamp
Archiver
Posts: 46,084
I Need the basic stamp the Input into my Serial port on my PC the
following String, 0001,+032,12.1,-093,-095,04.3,1,014,015
{Then a Pause For 2 Seconds}
0003,+032,12.1,-092,-091,04.3,1,014,015
{Then a Pause For 2 Seconds}
0004,+032,12.1,-098,-097,04.3,1,014,015
0005,+032,12.1,-095,-099,04.3,1,014,015
0006,+032,12.1,-091,-092,04.3,1,014,015
0007,+032,12.1,-099,-090,04.3,1,014,015
.
. ect ect
following String, 0001,+032,12.1,-093,-095,04.3,1,014,015
{Then a Pause For 2 Seconds}
0003,+032,12.1,-092,-091,04.3,1,014,015
{Then a Pause For 2 Seconds}
0004,+032,12.1,-098,-097,04.3,1,014,015
0005,+032,12.1,-095,-099,04.3,1,014,015
0006,+032,12.1,-091,-092,04.3,1,014,015
0007,+032,12.1,-099,-090,04.3,1,014,015
.
. ect ect
Comments
Stamp's DEBUG output (9600 baud) then you can use this as-is, otherwise
change it to SEROUT (on pin 16 if you want to use the programming port)
for the baud you need.
In your example the only fields that changed were the index and the
third so this little demo does that (using RANDOM to change field 3).
' {$STAMP BS2}
' $PBASIC 2.5}
idx VAR Word
field3 VAR Word
Setup:
idx = 1
Main:
DO
RANDOM field3
field3 = field3 // 10 + 90
DEBUG DEC4 idx, ",+032,12.1,-", DEC3 field3, ",-095,04.3,1,014,015",
CR
idx = idx + 1
PAUSE 2000
LOOP
END
Original Message
From: Brian E Boothe [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=Hh2jGxlMKBP2Kf6VbwtafTuEg2JHx9_8yA-_vGHiLbJ6WZXAU6LQM8l1gmIbDN8ofU_UACAtdVyU_W9iIA]subrian@m...[/url
Sent: Thursday, December 18, 2003 8:27 AM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] Serial Data from stamp
I Need the basic stamp the Input into my Serial port on my PC the
following String, 0001,+032,12.1,-093,-095,04.3,1,014,015
{Then a Pause For 2 Seconds}
0003,+032,12.1,-092,-091,04.3,1,014,015
{Then a Pause For 2 Seconds}
0004,+032,12.1,-098,-097,04.3,1,014,015
0005,+032,12.1,-095,-099,04.3,1,014,015
0006,+032,12.1,-091,-092,04.3,1,014,015
0007,+032,12.1,-099,-090,04.3,1,014,015
.
. ect ect
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
This message has been scanned by WebShield. Please report SPAM to
abuse@p....
Original Message
From: Jon Williams [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=c2mvQzdKI4JhwaKft_xEThJ5fuKurGnHya2pw5s_1xoPEVViqzG4z-hEV87q1TTJY1dmBPc8MBahtZLLnuG3gQ]jwilliams@p...[/url
Sent: Thursday, December 18, 2003 8:55 AM
To: basicstamps@yahoogroups.com
Subject: RE: [noparse][[/noparse]basicstamps] Serial Data from stamp
Do you care about baud rate? If your PC program will work with the
Stamp's DEBUG output (9600 baud) then you can use this as-is, otherwise
change it to SEROUT (on pin 16 if you want to use the programming port)
for the baud you need.
In your example the only fields that changed were the index and the
third so this little demo does that (using RANDOM to change field 3).
' {$STAMP BS2}
' $PBASIC 2.5}
idx VAR Word
field3 VAR Word
Setup:
idx = 1
Main:
DO
RANDOM field3
field3 = field3 // 10 + 90
DEBUG DEC4 idx, ",+032,12.1,-", DEC3 field3, ",-095,04.3,1,014,015",
CR
idx = idx + 1
PAUSE 2000
LOOP
END
Original Message
From: Brian E Boothe [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=yFGodzXgNx7F8hVbjUDXaUHVfug-04qGXd1gHw7SqzTsdJsm6GmuF6b2U5uowMeqjNnr6VhpkVKSZJc]subrian@m...[/url
Sent: Thursday, December 18, 2003 8:27 AM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] Serial Data from stamp
I Need the basic stamp the Input into my Serial port on my PC the
following String, 0001,+032,12.1,-093,-095,04.3,1,014,015
{Then a Pause For 2 Seconds}
0003,+032,12.1,-092,-091,04.3,1,014,015
{Then a Pause For 2 Seconds}
0004,+032,12.1,-098,-097,04.3,1,014,015
0005,+032,12.1,-095,-099,04.3,1,014,015
0006,+032,12.1,-091,-092,04.3,1,014,015
0007,+032,12.1,-099,-090,04.3,1,014,015
.
. ect ect
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
This message has been scanned by WebShield. Please report SPAM to
abuse@p....
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
window and you'll see the data -- yes, ASCII strings. Now, close the
BASIC Stamp editor (which will free the programming comm port) and run
your VB program selecting the comm port you use for programming. The
baud rate will be 9600.
It will be up to your VB program to parse and process the data.
The example below was not intended to be THE answer, just something to
get you started. Now that you can see how the "simulator" is done, you
can adjust any way you choose.
-- Jon Williams
-- Applications Engineer, Parallax
-- Dallas Office
Original Message
From: Brian E Boothe [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=VjvZ42pkcR7v3Qebha-xORHohEaZd-ks7ZbAEfTuQ67mdqPJggF3eF9IFmyiG7jcJF3eusaFop96]subrian@m...[/url
Sent: Thursday, December 18, 2003 1:35 PM
To: basicstamps@yahoogroups.com
Subject: RE: [noparse][[/noparse]basicstamps] Serial Data from stamp
I need it to change the 0001 field also
Original Message
From: Jon Williams [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=blq2AxeOkcu_5DTs5ju12TjewJ1XuRcsEvlvENVU89KAYYdqSiMiEZxxSgwVOGHBkDiGj-DQ-UkJve9AVw]jwilliams@p...[/url
Sent: Thursday, December 18, 2003 8:55 AM
To: basicstamps@yahoogroups.com
Subject: RE: [noparse][[/noparse]basicstamps] Serial Data from stamp
Do you care about baud rate? If your PC program will work with the
Stamp's DEBUG output (9600 baud) then you can use this as-is, otherwise
change it to SEROUT (on pin 16 if you want to use the programming port)
for the baud you need.
In your example the only fields that changed were the index and the
third so this little demo does that (using RANDOM to change field 3).
' {$STAMP BS2}
' $PBASIC 2.5}
idx VAR Word
field3 VAR Word
Setup:
idx = 1
Main:
DO
RANDOM field3
field3 = field3 // 10 + 90
DEBUG DEC4 idx, ",+032,12.1,-", DEC3 field3, ",-095,04.3,1,014,015",
CR
idx = idx + 1
PAUSE 2000
LOOP
END
Original Message
From: Brian E Boothe [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=VjvZ42pkcR7v3Qebha-xORHohEaZd-ks7ZbAEfTuQ67mdqPJggF3eF9IFmyiG7jcJF3eusaFop96]subrian@m...[/url
Sent: Thursday, December 18, 2003 8:27 AM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] Serial Data from stamp
I Need the basic stamp the Input into my Serial port on my PC the
following String, 0001,+032,12.1,-093,-095,04.3,1,014,015
{Then a Pause For 2 Seconds}
0003,+032,12.1,-092,-091,04.3,1,014,015
{Then a Pause For 2 Seconds}
0004,+032,12.1,-098,-097,04.3,1,014,015
0005,+032,12.1,-095,-099,04.3,1,014,015
0006,+032,12.1,-091,-092,04.3,1,014,015
0007,+032,12.1,-099,-090,04.3,1,014,015
.
. ect ect
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
This message has been scanned by WebShield. Please report SPAM to
abuse@p....
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
This message has been scanned by WebShield. Please report SPAM to
abuse@p....
anything from my stamp in my vb program it is setup For COM1 in my
program
In VB. I wanna blink an LED every poll
Original Message
From: Jon Williams [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=-sCx6acq9FMi1FWFCYGYK_2mcmXjIKjyubUYKhuf15rC0M6J16phcSX64ZNdFsQ6hZ_WoxF_7fwKMy2kM-9l]jwilliams@p...[/url
Sent: Thursday, December 18, 2003 2:08 PM
To: basicstamps@yahoogroups.com
Subject: RE: [noparse][[/noparse]basicstamps] Serial Data from stamp
If you run the program in your BASIC Stamp editor it will open a DEBUG
window and you'll see the data -- yes, ASCII strings. Now, close the
BASIC Stamp editor (which will free the programming comm port) and run
your VB program selecting the comm port you use for programming. The
baud rate will be 9600.
It will be up to your VB program to parse and process the data.
The example below was not intended to be THE answer, just something to
get you started. Now that you can see how the "simulator" is done, you
can adjust any way you choose.
-- Jon Williams
-- Applications Engineer, Parallax
-- Dallas Office
Original Message
From: Brian E Boothe [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=SeB78K4vHJH6-MdbZn36xr7enwzJRIjyo8sK1wHVUNhQrbiU1N-oHtBGRu89-rAvhY_VIEpw1mzF]subrian@m...[/url
Sent: Thursday, December 18, 2003 1:35 PM
To: basicstamps@yahoogroups.com
Subject: RE: [noparse][[/noparse]basicstamps] Serial Data from stamp
I need it to change the 0001 field also
Original Message
From: Jon Williams [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=-sCx6acq9FMi1FWFCYGYK_2mcmXjIKjyubUYKhuf15rC0M6J16phcSX64ZNdFsQ6hZ_WoxF_7fwKMy2kM-9l]jwilliams@p...[/url
Sent: Thursday, December 18, 2003 8:55 AM
To: basicstamps@yahoogroups.com
Subject: RE: [noparse][[/noparse]basicstamps] Serial Data from stamp
Do you care about baud rate? If your PC program will work with the
Stamp's DEBUG output (9600 baud) then you can use this as-is, otherwise
change it to SEROUT (on pin 16 if you want to use the programming port)
for the baud you need.
In your example the only fields that changed were the index and the
third so this little demo does that (using RANDOM to change field 3).
' {$STAMP BS2}
' $PBASIC 2.5}
idx VAR Word
field3 VAR Word
Setup:
idx = 1
Main:
DO
RANDOM field3
field3 = field3 // 10 + 90
DEBUG DEC4 idx, ",+032,12.1,-", DEC3 field3, ",-095,04.3,1,014,015",
CR
idx = idx + 1
PAUSE 2000
LOOP
END
Original Message
From: Brian E Boothe [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=SeB78K4vHJH6-MdbZn36xr7enwzJRIjyo8sK1wHVUNhQrbiU1N-oHtBGRu89-rAvhY_VIEpw1mzF]subrian@m...[/url
Sent: Thursday, December 18, 2003 8:27 AM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] Serial Data from stamp
I Need the basic stamp the Input into my Serial port on my PC the
following String, 0001,+032,12.1,-093,-095,04.3,1,014,015
{Then a Pause For 2 Seconds}
0003,+032,12.1,-092,-091,04.3,1,014,015
{Then a Pause For 2 Seconds}
0004,+032,12.1,-098,-097,04.3,1,014,015
0005,+032,12.1,-095,-099,04.3,1,014,015
0006,+032,12.1,-091,-092,04.3,1,014,015
0007,+032,12.1,-099,-090,04.3,1,014,015
.
. ect ect
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
This message has been scanned by WebShield. Please report SPAM to
abuse@p....
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
This message has been scanned by WebShield. Please report SPAM to
abuse@p....
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/