New user. great site. Need help with the basic stamp!!! ugh
flcracker
Posts: 5
Hi everyone
trying to help my daughter w her sci fair project.· i think· i am in over my head.· She want to open the blinds (rotate 90*) when the alrm goes off.· wants to get her sister out of bed quicker! (so she is not late for school).· so here i am.· we built the BS and hooked up the servo. wrote and ran the basic three turn program.· hmm. scratch, scratch...· so ive got to get the speaker hooked up to the i/o pin?· however that works.· and get it to start the servo to rotate 90*.· sounds so darn simple.· debug this and loop that.· i read the book (loosely). just a little hard to understand all this stuff.· very interesting, yet unfamiliar.·
So if someone thinks they can help·a father out... let me know.· i would be soo thankful.
trying to help my daughter w her sci fair project.· i think· i am in over my head.· She want to open the blinds (rotate 90*) when the alrm goes off.· wants to get her sister out of bed quicker! (so she is not late for school).· so here i am.· we built the BS and hooked up the servo. wrote and ran the basic three turn program.· hmm. scratch, scratch...· so ive got to get the speaker hooked up to the i/o pin?· however that works.· and get it to start the servo to rotate 90*.· sounds so darn simple.· debug this and loop that.· i read the book (loosely). just a little hard to understand all this stuff.· very interesting, yet unfamiliar.·
So if someone thinks they can help·a father out... let me know.· i would be soo thankful.
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
Thanks so much. we have built the circuit for the servo on the stamp. the three turn program works as it should. i just need the servo to turn 90 degrees, so i need to augment the program to do this. the option to open and close (rotate 90 then back and loop) would be of interest also.
So, thats about as far as we have gotton. The signal will come from the speaker current when the alarm goes off. so i need to get this current to the stamp. and have it run the servo. does this help?
Below is the basic program from the book that we input...
' What's a Microcontroller - ServoTest.bs2
' Test the servo at three different position signals.
' {$STAMP BS2}
' {PBASIC 2.5}
counter VAR Word
DEBUG "Counterclockwise 10 o'clock" , CR
FOR counter = 1 TO 150
PULSOUT 14, 1000
PAUSE 20
NEXT
DEBUG "Clockwise 2 o'clock", CR
FOR counter = 1 TO 150
PULSOUT 14, 500
PAUSE 20
NEXT
DEBUG "Center 12 o'clock", CR
FOR counter = 1 TO 150
PULSOUT 14, 750
PAUSE 20
NEXT
DEBUG "ALL DONE"
END
' {$STAMP BS2}
' {PBASIC 2.5}
pulse VAR Word
counter VAR Byte
start:
DEBUG "Enter a value from 250 to 1250",CR
DEBUGIN pulse
FOR counter = 1 to 150
PULSOUT 14,pulse
PAUSE 20
NEXT
GOTO start
I got the coding done for the servo!!!! mission accomplished!! tested and works...
I want to start the program with a pulse from the alarm clock speaker. here in lies my next problem. Need an if then code for the siganl.. i am totally in the dark.
can someone shed some light please. i have this
' {$STAMP BS2}
' {PBASIC 2.5}
??? not sure what shohuld go here
IF
in1 = 1
THEN
Go sub "have blinds open"
OPEN BLINDS
END
so basically i dont know.
i appreciate this help. i need to have this written and working tonight!! wahooo
thanks
Stephen