Note: Try this at your own risk. Get a professional to help if you are unsure.
Update: There is now a product from Seeed that is a clone of the arduino. Stores are discounting the regular arduino simce the Seeeed items are about half the cost of the Arduino.
Step 1: What's Needed.
Driveway Alert system.
3 "C' cell batteries
1 9V battery
2 - 330 ohm resistors
1 - 3k resistor
Breadboard for testing
1 parallel port break out cable.
Step 2: Main Circuits.
Note: resistor from the Arduino to the MOC could be as low as 330 ohms.
Step 3: The Code.
int ldr = 0; //analog pin to which LDR is connected
int ldr_value = 0; //variable to store LDR values
int ledPin = 12;
pinMode(ledPin, OUTPUT); // sets the digital pin as output
ldr_value = analogRead(ldr); //reads the LDR values
if (ldr_value > 50)
digitalWrite(ledPin, HIGH); // sets the LED on
delay(5000); // waits for 5 seconds before rearming
digitalWrite(ledPin, LOW); // sets the LED off
do until 0 <> 0
do until (res AND 64) = 6
res = INP(&H379)
rem 64 is for pin 10 if it goes high
rem execute whatever code you want to let you know there was motion.
rem bti sends a twitter to the set up account.
shell "echo there was motion | bti"
rem Timing loop before rearming.
for z = 1 to 500000