Sound Files

StampPlot can play .WAV files to add sound effects to your program. There is an assortment in the StampPlot/Media directory. The sound files are treated just like the drawing instructions. By default StampPlot looks in the media directory for the sound file unless otherwise specified.

~PWAV clap

IWAV may also be used. This instruction will stop the prior wave file to play this one immediately. Compare the following two sets using the CLI:

~PWAV clap(CR)~PWAV boing ~PWAV clap(CR)~IWAV boing

Can you modify the last program to 'boing' every time a point is plotted? Image Files

StampPlot has a collection of jpeg (.jpg) image files that can be used to add images to your plot. These are again treated as drawing instructions using coordinates. The media directory is the default directory for images:

!POBJ Clear !NEWP !PLOT ON

*IMGP 8 0a,100a,90a,110a,comp\led_red_1.jpg *IMGP 90a,100a,100a/110a/comp\led_grn_0.jpg

Again, the instructions may come from the BASIC Stamp module

'Plot digital and place 2 images

PAUSE 1000

DEBUG

CR,"!POBJ Clear",CR

DEBUG

"!NEWP",CR

DEBUG

"!PLOT ON",CR

DEBUG

"@TEXT 35a, 102a, 2, (BLUE), StampPlot Images!"

, CR

x VAR Byte

DO

RANDOM x

' plot digital values

DEBUG IBIN2 x,CR

' Place LEDs on plot

DEBUG "aIMGP 80a,100a,

90a,110a,comp\led red (BITO).jpg", CR

DEBUG "aIMGP 90a,100a,

100a,110a,comp\led grn (BITl).jpg", CR

PAUSE 500

LOOP

(BIT0) and (BIT1) are replaced when used by StampPlot with 1 or 0 depending on the status of those bits plotted respectively.

mpPI

pt lin/i

/f

hi n

■il

DIY Battery Repair

DIY Battery Repair

You can now recondition your old batteries at home and bring them back to 100 percent of their working condition. This guide will enable you to revive All NiCd batteries regardless of brand and battery volt. It will give you the required information on how to re-energize and revive your NiCd batteries through the RVD process, charging method and charging guidelines.

Get My Free Ebook


Post a comment