Serious code help
please someone help me.
i have science fair due Saturday morning, and i have no idea what im doing.
i have a BASIC stamp discovery kit.
i have assembled the speaker and the ping ultrasonic sensor.
i need helping making an "if then" code.
i need my speaker to go off when my sensors recognize something within two feet.
pleaseeee help me
i have science fair due Saturday morning, and i have no idea what im doing.
i have a BASIC stamp discovery kit.
i have assembled the speaker and the ping ultrasonic sensor.
i need helping making an "if then" code.
i need my speaker to go off when my sensors recognize something within two feet.
pleaseeee help me
Comments
1) You need to get the sample programs to work with your PING))) so you can see on the debug screen the distance detected by the PING))).
2) You need to get the speaker to "go off" based on the sample code in the manual in the discovery kit.
3) In the PING))) sample program, you use an IF statement like "IF distance > 2000 THEN" or something like that and follow that with the other code from the sample program for the speaker that makes it "go off" and you'll need an "ENDIF" after the noisemaking code.
We won't write the program for you, but will be happy to help you over rough spots and places where you don't understand what the manual says.
You really have to work through the examples in the discovery kit to understand what you're doing.
and thank you very much
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
You need to figure out how the sample code works. If you don't understand where you will need to put the IF THEN, you need to study what the PING))) sample program (PING_Demo.bs2) does and it should become clear.
www.parallax.com/Portals/0/Downloads/docs/books/edu/Wamv2_2.pdf
For speaker control code start reading on page 219.
Post Edited (Jed) : 1/25/2008 4:36:14 PM GMT