School project! need help!
asianjun
Posts: 2
I am extremely new to circuits and things related to it, but i have a project for school and i need assistance on how to program a basic stamp to act as a receiver for a sensor and interpret data to sense distance and direction.
Comments
If you're using Parallax sensors, the webstore page for the product always has links to documentation and sample code for the product.
Do you have a basic stamp ? If so which one ? BS2, BS2sx, BS2px, etc.
Do you have any code written ? Do you have a flowchart ? Do you have a plan ?
Tell us something like:
· I need to connect a Ping ultrasonic sensor to a BS2p and display the distance measured on a parallax serial LCD.
· Here is my plan:
··· 1) Initialize LCD
··· 2) Read Ping sensor
··· 3) Convert reading to inches
··· 4) Display inches on the LCD
··· 5) Goto step 2
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
There is a fine line between arrogance and confidence. Make sure you don't cross it...
·
my plan is to
1. Initialize lcd
(possibly attach some sort of sound emitter)
2. Read ping sensor
3. Convert reading to feet
4. Display on lcd
5. triangulate direction
5. Display on Lcd
Basically, in my project is two parts, the thing that locates(base) and device that is supposed to be located(source). The base will send a signal to the source and the source will send a signal back. The base will interpret the data to figure out distance and location. it will then be displayed on an lcd showing Distance in Feet two one decimal place and the direction in 2d(i want 3d but its complicated).
That said, take a look at this thread:
http://forums.parallax.com/showthread.php?p=791053
You can't use the Ping))) from Parallax to triangulate direction as you're thinking. While ultrasonic is a valid option for this type of assignment, the Ping is intended to measure reflected distances, not single path distances (one way). Whatever method you choose, though, you'll need a microcontroller. The BS2 series might work for you, as will many other microcontrollers. However, you posted in the Basic Stamp forum so the implication was that you're using a BS model.