No I/O Example
This example required no I/O devices.
1) Download program to Stamp
2) Close debug window
3) Select COM port and connect with Stamp Plot Lite
4) Reset the Stamp
'No I/O required Stamp Ptot example
'Plots 0-15, analog and digital
'Configure the plot
PAUSE 500 'Short pause to allow buffer to clear
DEBUG "!RSET",CR 'Reset plot to clear data
DEBUG "!TITL Analog and Binary Example",CR 'Title the form
DEBUG "!SPAN -5, 45",CR 'Span analog range
DEBUG "!PNTS 125",CR '125 points of data to plot
DEBUG "!TMAX 30",CR '30 seconds
DEBUG "!MAXS",CR 'Stop plotting at max data points
DEBUG "!TSMP ON",CR 'Enable Time Stamping
DEBUG "!CLRM",CR 'Clear message box
DEBUG "!PLOT ON",CR 'Enable plotting
DEBUG "!RSET",CR 'Reset the stamp to time 0
Pause 200
'Count 0 to 15, display binary and analog values
X VAR nib
Loop:
FOR x = 0 to 15
GOSUB Display 'Display, Pause and Dislpay
Pause 300
GOSUB Display
Next
Debug "Loop Complete",CR
Goto Loop
Display:
DEBUG IBIN4 X, CR 'Plot Digital
DEBUG DEC X,CR 'Plot analog
'Update User Status
DEBUG "!USRS The count is ",DEC X," (", IBIN4 X,")",CR
Return