3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Mil-Spec PEZ Dispenser

Step 3Basic Stamp (BS2-BOE) Source Code

Basic Stamp (BS2-BOE) Source Code
'***************************************************************************
'* mil-pez.BS2
'* Alan Mollick
'* www.alanmollick.com
'***************************************************************************
' {$STAMP BS2}
' {$PBASIC 2.5}
' {$PORT COM5}

INPUT 0 ' IR detector
OUTPUT 3 ' 3-way solenoid
OUTPUT 4 ' LED
OUTPUT 8 ' 5-way solenoid
INPUT 10 ' head up feedback switch

Main:
PAUSE 5

Hold:
IF (IN0 = 1) THEN Hold ' wait for TV IR signal

HIGH 4 ' LED = on
HIGH 3 ' 3-way solenoid on, head pulled back
PAUSE 50

Hold10:
IF (IN10 = 1) THEN Hold10 ' Stay here until switch (pin 1) = low

PAUSE 10
HIGH 8 ' 5-way solenoid = on
PAUSE 200
LOW 8 ' 5-way solenoid = off
PAUSE 35
LOW 3 ' 3-way solenoid = off
LOW 4 ' LED = off
PAUSE 25

GOTO Main

'***************************************************************************
« Previous StepDownload PDFView All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
7
Followers
5
Author:el_roboto_loco