Shop OBEX P1 Docs P2 Docs Learn Events
How to get it to work on a BS1?????? — Parallax Forums

How to get it to work on a BS1??????

mikethomasmikethomas Posts: 6
edited 2006-09-26 18:53 in BASIC Stamp
OK, Im an artist who is fumbling through Basic for sake of my art. What I am doing is controlling three servos in response to the PIR sensor from parallax. When the pin for the PIR = 1 I have all three servos go to one position, when the PIR=0 they go to another position. I managed to figure a bit of code out to make it work with my BS2 (I even surprised myself), but for the life of me I cant make it work on my BS1 project board. I wand to use the BS1 because of size and cost, but there isnt as much info on it as the BS2. Here is the code that I wrote for the BS2. I will leave out PIN 14 and 13 for sake of typing. PIN 11 is my PIR. Please, no laughter, I am new to this-hahahaha:

counter VAR Word

DO

DEBUG ? IN11

IF (IN11 = 1) THEN

FOR counter = 1 TO 75
PULSOUT 15, 600
PAUSE 20
NEXT

ELSE
FOR counter = 1 TO 25
PULSOUT 15, 800
PAUSE 20
NEXT

ENDIF

LOOP



So, this might be a very messy code, but it actually works for what I need. I just cant figure out how to put it into the proper syntax for my BS1. Ive placed the PIR on P7, and my servos on P6,P5,P4 (on the BS1). HELP!!!

Here is a pic of the piece this is for when I had been running it on a very messy walmart motion detector and a 555T--it had a serious drifting problem due to the heat created so thats why im going digital

Comments

Sign In or Register to comment.