27220 Parallax Inc, 27220 Datasheet - Page 73

BOOK STAMPWORKS

27220

Manufacturer Part Number
27220
Description
BOOK STAMPWORKS
Manufacturer
Parallax Inc
Datasheet

Specifications of 27220

Accessory Type
Booklet
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
StampWorks
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Not applicable / Not applicable
EXPERIMENT #9: A DIGITAL DIE
In Experiment #6 we created a simple game; this time around we’ll make a simple
digital die (on half of a pair of dice) that can be used when we play our favorite
board games.
Building the Circuit
Add this pushbutton to the circuit in Experiment #8.
Program: SW21-EX09-Roller.BS2
' {$STAMP BS2}
' {$PBASIC 2.5}
' -----[ Program Description ]---------------------------------------------
'
' This program combines a 7-segment display and pushbutton input to form
' a digital die that displays numbers 1 - 6.
' unmodified, on any BS2-family module.
' -----[ I/O Definitions ]-------------------------------------------------
Segs
SegsDirs
RollBtn
' -----[ Variables ]-------------------------------------------------------
VAR
VAR
PIN
OUTL
DIRL
15
This program will work,
' Segments on P0 - P7
' DIRS for segments
' roll button for die

Related parts for 27220