else's documentation.
DLC
Mike Martin wrote:
> Hello All (newbie question)
> I'd like to ask two things.
> 1)Is the diagram on http://www.oopic.com/gp2d12.htm wrong? The
> datasheet in the sensors & detectors folder in the files section have
> the pinout different to that on the oopic site (as well as the wiring
> colours). If I look at mine face-on, from left to right the wiring is
> yellow/black/red for Vo/GND/Voc but the website suggests GND/Voc/Vc.
> So you see, I'm having trouble figuring out if it even works.
> 2)Also, does someone have a code snippet (or a known working diagram)
> I could borrow to test it? I'm not entirely sure what to read from
> the IO line. What does IR.Value produce? So far all I can get out of
> it is an integer value of 46. I'm using B.1.0 firmware. How can a
> digital IOline read fluctuating voltages? Is it converted to varying
> pulses? The code I'm using is below:
>
> 'Turns on a RED LED - fishing for a value out of the IR
> Sub main()
> Red.IOLine = 1
> IR.IOLine = 3
> Red.Value = 0
> ooPIC.ExtVRef=0
> IR.Operate=cvTrue
> X = IR.Value
> If X = 46 Then 'discovered this value by trial and error
> Red.TurnOn
> End If
> Delay = 1000
> Red.TurnOff
> End Sub
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
>
>
>
--
------------------------------------------------------
Dennis Clark ooPIC Tech Support
www.oopic.com
------------------------------------------------------
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/oopic/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/oopic/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:oopic-digest@yahoogroups.com
mailto:oopic-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
oopic-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
No comments:
Post a Comment