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.

Make a remote controlled camera from a cellphone!

Step 3The code

The code
This is actually my first project involving a microcontroller. I recently acquired the Picaxe Experimenter board (and USB Programming Cable ) and I would highly recommend it for those interested in learning about micros.

Let it be said; I'm a terrible coder and there are thousands of ways to do this better. The code is ugly but but it works and can be snatched below.

The red standby-Led helps in confirming that the program is running:

standby:

high 5
pause 100
low 5
pause 300
goto main

When a text or call is received a LED connected to the speaker output shines onto the LDR (light dependent resistor). The value is then read:

readadc 2,b0

if b0 < 90 then standby

if b0 > 90 then run

The start of the "run" command:

run:

wait 2

high 3
pause 100
low 3
pause 400

wait 6

high 1
pause 100
low 1
pause 300

high 2
high 1
pause 100
low 1
low 2
pause 300
« 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!
98
Followers
6
Author:tanntraad