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.

Song-following Led-flashing Hack-O-Lantern!

Step 5The Software

The Software
The program that I made, is in the basic programming language, and will output the frequency required, at the same time as it lights up an LED. If your not a programmer or just don't like coding, don't worry, Ive included the code I used, and I will explain how it works so you can modify it if you need to. I've included the program in basic stamp format (.bs2) and in a text document (.txt)

' {$STAMP BS2}
' {$PBASIC 2.5}
These two commands above are to tell the compiler what type of coding you are using, and what type of hardware you will be using.


DO

The "do" command tells the controller to do everything it finds until it hits a loop command

HIGH 14

The "high" command tells the Controller to apply voltage to
the pin that follows, in this case the PIN is number 14,
the same number fourteen as there is on your micro controller


PAUSE 100

The "pause" command tells the controller to pause everything that it is doing
for a given time in this case it will pause for 100 mili seconds

FREQOUT 9,200, 1568

The "Freqout" command tells the Controller to output a certian frequency
for a certian durration of time through a certian pin number, in this case
the pin number is 9, the time is 200 mili seconds and the frequency is 1568Hz

LOW 14

The "low" command tells the controller to stop applying voltage to a certain pin,
in this case pin 14.

LOOP
The "loop" command tells the controller to go back the the "DO" command it
found earlier, this will create a loop.
« 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!
13
Followers
6
Author:alfonso
Hi! I'm a freshman in college at California Polytechnic State University, majoring in Aerospace engineering. I interned for a short period at Instructables and love building and making. A few of my pr...
more »