BSAB Example
This sample program is intended to be used with the BSAB
1) Download the program to the STAMP
2) Close the DEBUG Window
3) Connect using Stamp Plot
4) Reset the Stamp to auto-configure Stamp Plot
5) Adjust BSAB POT and press buttons.
pot var word 'Variable for BSAB pot
Pause 500
Debug "!rset",13 'Reset plot (clears data in memory to prevent slow plot shifts)
Debug "!titl BSAB Example Plot",13 'Change caption of window
Debug "!Span 0,600",13 'Set max analog value
Debug "!tmax 30",13 'Set for 30 second plot
Debug "!Amul .1",13 'Set a multiplier to .1 (0-~600)
Debug "!shft off",13 'Turn auto-shifting off
Debug "!pnts 200", 13 'Setup for 200 data points
Debug "!maxr",13 'Restart after full
Debug "!plot on",13 'Enable plotting
Debug "!clrm",13 'Clear messages
Debug "!tsmp on",13 'Enable Time stamping
Debug "!rset",13 'Reset again
Debug "Configured and reset by Stamp",13 'Display message
Debug "!USRS Welcome to Stamp Plot Lite!",13
loop:
If in8 = 1 then skipblue 'If blue is pressed, display message
Debug "Blue was pressed!",13
Debug "!BELL",13 'and sound bell
skipblue:
If in9= 1 then skipblack 'If black is pressed, display pot value message
Debug "The POT value is ", Dec pot,13
Skipblack:
If in10 = 1 then skipgreen 'If green is pressed, turn off plotting
Debug "!PLOT OFF",13
Debug "!USRS Plot was disabled by Stamp",13
skipgreen:
If in11 = 1 then skipred 'If Red is pressed, reset the plot
DEBUG "!plot on",13
DEBUG "!RSET",13
DEBUG "!USRS Plot was enabled and cleared by Stamp",13
skipred:
high 7 'Read pot and send value
pause 10
rctime 7, 3,pot
debug dec pot,13
debug ibin4 inc,13 'Send binary values of buttons
Pause 100
goto loop 'Repeat