I have a problem. It says on the start here tutorial "make sure you buy analogue" but i went out and bought digital sensor-wise. My question is, how would one wire the DIRRS+ to my picaxe 28x board?
Ok now to the software:
remember: datasheets are your best friends, they tell you how to wire stuff, and how to code it, often by giving examples. So this is what it says about how it should be operated:
In this mode the DIRRS+ uses TTL (5 Volt Logic) to serially transmit a preamble
byte (“10101010”) followed by a single byte. The mode is set to 4800 bps 8N1
Example code is given for the BASIC Stamp II. For other microcontrollers
please see our website for other examples or refer to your datasheet. An object
at 10 cm will result in Hex - FF (Binary 11111111 or DEC 255) being transmitted.
An object at 80 cm will result in Hex - 00 (Binary 00000000 or DEC 0) being sent.
When no object is present some fluctuations may occur in the measurement of
0V resulting in values being sent.
This may look complicated at first so they give us an example:
Be advised that 0 (just after the serin command) is the output pin you are using, so it might be some other number. If it works correctly you will have your value stored in b0. You can then compare it to your standards (EG: if b0 < 150 then...)
I am not sure about how to write the qualifier "(%10101010)" but i think the syntax is correct. If it doesn't work try removing the % (which stands for binary) or putting it inside "s.
The debug window just says waiting.