Does anyone out there, besides me, still use the Basic Stamp?

VP9KS

Well-Known Member
Many moons ago, (actually Many, Many, many moons ago) I started experimenting with the basic stamp Microprocessors, and have embedded them in a machine or two, to add functionality, or use a new type of sensor. I have also experimented with them as a hobby.
 
  • Like
Reactions: Rob


VP9KS

Well-Known Member
Here is an example of a fun program for the Basic Stamp2 series. In fact, due to the "Conditional Compile Directives" which I Embedded in the program, it can be used on any of the BS2 series, from the BS2 to the BS2P, with no modifications. The text can be coppied and pasted into the basic stamp editor as it is displayed here. If you know morse code, you can use the characters in this program as a template for all other characters, and generate your own code. Looking at the date of the file, I last modified this program in November of 2015. Also, the debug commands cause the characters to display on a computer connected to the basid stamp, as they are sent. Beauty, eh?

'{$STAMP BS2}

'{$PORT COM1}



' FOXBOX 13 WPM

'

' WRITTEN BY PAUL BAXTER WA1WJB / VP9KS

'

' A FOX BOX IS A DEVICE USED TO AUTOMATICALLY CONTROL A HIDDEN RADIO
'TRANSMITTER, KNOWN AS THE FOX. A FOX HUNT IS A CONTEST TO SEE WHO CAN FIND
'IT FIRST, USING VARIOUS METHODS OF DIRECTION FINDING. THERE ARE MANY
'DESIGNS AVAILABLE FOR SUCH A DEVICE. THIS ONE USES A BASIC STAMP 2 SERIES
'MICROPROCESSOR.
'
'
'
'THE PROGRAM BEGINS BY SETTING OUTPUT 14 HIGH. THIS OUTPUT IS USED TO KEY A
'TRANSMITTER. THE STAMP THEN SENDS 1000 HZ TONES FROM OUTPUT 9, TO THE AUDIO
' INPUT OF THE TRANSMITTER FOR "DE WA1WJB/4 FOXBOX K" AT 13 WORDS PER MINUTE
'IN MORSE CODE.
'
'
'
' THE END OF THE PROGRAM SETS PIN 14 LOW, UNKEYING THE TRANSMITTER. THEN
'BEGINS A WAIT CYCLE OF 3 MINUTES BEFORE RETURNING TO THE START OF THE
'PROGRAM. THIS CYCLE CONTINUES UNTIL THE STAMP IS TURNED OFF.
'
'
'
' DEBUG COMMANDS HAVE BEEN INSERTED TO SHOW THE MESSAGE ON A COMPUTER
'CONNECTED TO THE STAMP'S SERIAL PORT, AS IT IS BEING SENT, INCLUDING KEYING /
'UNKEYING THE TRANSMITTER.

'

' A COMPANION FILE NAMED "FB 13WPM charac list.BS2" CONTAINS MODULES FOR ALL OF
'THE LETTERS OF THE ALPHABET, THE NUMBERS 0 THROUGH 9, SOME PUNCTUATION
'MARKS, AND SOME PROCEDURAL SIGNALS.
'
'
'
' THE FIRST SECTION, USING THE #SELECT...#CASE CONDITIONAL COMPILE DIRECTIVES,
'HAS BEEN ADDED TO TO THE ORIGINAL PROGRAM, TO ALLOW THE SAME CODE TO BE
'USED FOR ANY OF THE BS2 SERIES OF PROCESSORS, WITHOUT CAUSING ANY TIMING
'OR FREQUENCY ISSUES.

' THIS ADDITIONAL CODE WILL ONLY FUNCTION IF USED IN PBASIC VERSION 2.5.
'
'
'
#SELECT $STAMP

#CASE BS2, BS2E

TmAdj CON $100 ' x 1.0 (time adjust)

FrAdj CON $100 ' x 1.0 (freq adjust)

#CASE BS2SX

TmAdj CON $280 ' x 2.5

FrAdj CON $066 ' x 0.4

#CASE BS2P

TmAdj CON $3C5 ' x 3.77

FrAdj CON $044 ' x 0.265

#CASE BS2PE

TmAdj CON $100 ' x 1.0

FrAdj CON $0A9 ' x 0.662

#CASE BS2PX

TmAdj CON $607 ' x 6.03

FrAdj CON $2A ' x 0.166

#ENDSELECT



Main:



DEBUG "13 WPM FOXBOX PROGRAM", CR, CR



AGAIN:

DEBUG CR,"KEY TRANSMITTER!",CR, CR

HIGH 14

PAUSE 1500

DEBUG 68 'D

FREQOUT 9, 180 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 60 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 60 */TmAdj, 1000 */FrAdj

PAUSE 200 */TmAdj

DEBUG 69 'E

FREQOUT 9, 60 */TmAdj, 1000 */FrAdj

PAUSE 300 */TmAdj



DEBUG 32,87 'W

FREQOUT 9, 60 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 180 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 180 */TmAdj, 1000 *FrAdj

PAUSE 200 */TmAdj



DEBUG 65 'A

FREQOUT 9, 60 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 180 */TmAdj, 1000 */FrAdj

PAUSE 200 */TmAdj



DEBUG 49 '1

FREQOUT 9, 60 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 180 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 180 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 180 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 180 */TmAdj, 1000 */FrAdj

PAUSE 200 */TmAdj



DEBUG 87 'W

FREQOUT 9, 60 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 180 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 180 */TmAdj, 1000 */FrAdj

PAUSE 200 */TmAdj



DEBUG 74 'J

FREQOUT 9, 60 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 180 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 180 */TmAdj, 1000 */FrAdj

PAUSE 100 *TmAdj

FREQOUT 9, 180 */TmAdj, 1000 */FrAdj

PAUSE 200 */TmAdj



DEBUG 66 'B

FREQOUT 9, 180 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 60 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 60 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 60 */TmAdj, 1000 */FrAdj

PAUSE 200 */TmAdj



DEBUG 47 '/

FREQOUT 9, 180 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 60 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 60 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 180 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 60 */TmAdj, 1000 */FrAdj

PAUSE 200 */Tmadj



DEBUG 52 '4

FREQOUT 9, 60 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 60 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 60 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 60 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 180 */Tmadj, 1000 */FrAdj

PAUSE 400 */TmAdj



DEBUG 32, 70 F

FREQOUT 9, 60 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 60 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 180 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 60 */FrAdj, 1000 */FrAdj

PAUSE 200 */TmAdj



DEBUG 79 'O

FREQOUT 9, 180 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 180 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 180 */TmAdj, 1000 */FrAdj

PAUSE 200 */TmAdj



DEBUG 88 'x

FREQOUT 9, 180 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 60 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 60 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 180 */TmAdj, 1000 */FrAdj

PAUSE 400 */TmAdj



DEBUG 32, 66 'B

FREQOUT 9, 180 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 60 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 60 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 60 */TmAdj, 1000 */FrAdj

PAUSE 200 */TmAdj



DEBUG 79 'O

FREQOUT 9, 180 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 180 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 180 */TmAdj, 1000 */FrAdj

PAUSE 200 */TmAdj



DEBUG 88 'X

FREQOUT 9, 180 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 60 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 60 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 180 */TmAdj, 1000 */FrAdj

PAUSE 1000 */Tmadj



DEBUG 32, 75, CR 'K

FREQOUT 9, 180 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 60 */TmAdj, 1000 */FrAdj

PAUSE 100 */TmAdj

FREQOUT 9, 180 */TmAdj, 1000 */FrAdj

PAUSE 500 */TmAdj



DEBUG CR, "UNKEY TRANSMITTER!", CR



LOW 14 'WAIT 3 MINUTES

PAUSE 60000 */TmAdj

PAUSE 60000 */TmAdj

PAUSE 60000 */TmAdj

GOTO AGAIN



Happy Trails,
Paul
 
Last edited:
  • Like
Reactions: Rob


Members online


Latest posts


Top