I REALLY need help with this!

Status
Not open for further replies.

ghost309

New Member
Anyone smart enough want to help?

I have the BASIC stamp homework board by parallax. I also have their PIR sensor. I want to make the circut so it will send a signal to my phone without another phone, but rather the computer. The only problem is, I don't know how to make something like that. So, does anyone know what i could do? This is the code I am using right now:


' ================================================== =======================
'
'
' {$STAMP BS2}
' {$PBASIC 2.5}
'
' ================================================== =======================


' -----[ Program Description ]---------------------------------------------

' This PIR demo allows you to see how to go about allowing a warm-up time
' for the sensor to settle, as well as displayed number of times tripped
' and possibly activating an alarm or relay, in this case the LED. The LED
' should have a 220 ohm or 330 ohm resistor in series with it.


' -----[ I/O Definitions ]-------------------------------------------------

PIR PIN 0 ' I/O Pin For PIR Sensor
LED PIN 1 ' I/O Pin For LED


' -----[ Variables ]-------------------------------------------------------

counter VAR Byte ' Trip Counter


' -----[ Initialization ]--------------------------------------------------

DEBUG CLS ' Clear DEBUG Screen
FOR counter = 40 TO 0 ' Wait 40 Seconds For PIR Warm-Up
DEBUG HOME, "WARMING UP:", DEC2 counter
PAUSE 1000 ' Display Counter Every Second
NEXT

counter = 0 ' Clear Counter Variable

DEBUG HOME, "WAITING... " ' Display Waiting Message

' -----[ Program Code ]----------------------------------------------------

Main:
DO
IF PIR = 1 THEN ' Motion Detected?
counter = counter + 1 ' Update Trip Counter
HIGH LED ' Light LED
DEBUG HOME, "TRIPPED...", DEC3 counter
DO : LOOP UNTIL PIR = 0 ' Wait For PIR To Clear
DEBUG HOME, "CLEARED...", DEC3 counter
LOW LED ' Turn Off LED
ENDIF
LOOP





PLEASE HELP!
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…