Friday, October 5, 2007

[oopic] Cadmium CDS (oCdS)

Hello,

I'm trying to use a CdS cell with my oopic. I'm certain that I've
done the wiring correctly, it's quite simple.

http://oopic.com/ocds.htm

has the following sample program:

"I As oCdS(1,0,cvOn)
P As oDIO8(3,cvOutput)

1:
P.State = I.Level
Goto 1"

Using this as a reference, I tried outputing the i.level value to an
LCD:

"LCD As oLCD(3,1,27,26,cvOn)
b As oByte
I As oCdS(1,0,cvOn)
I.IOLine = 14
LCD.Init
LCD.Clear
LCD.Locate(0,0) ' Locate cursor at 2nd row, 3rd column.


Do
LCD.Locate(0,0)
b = 0
b = I.Level
LCD.VString = Str$(b)
Delay = 500
Loop
"


I get "00154" or "00153" on the LCD. The value varies +-1.

Shining or turning off the light makes no difference. I tried using
another cell, same results.

Some clue as to what could be wrong: removing the cell or
disconnecting it from the i/o line makes no difference.
Im certain the wiring is right.. Could it be the program?

Thanks in advance


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:

http://docs.yahoo.com/info/terms/

No comments:

Post a Comment