LED Light Sensor - Need Help Please


Results 1 to 11 of 11

Threaded View

  1. #5
    Join Date
    Aug 2011
    Location
    Guadalajara, México
    Posts
    28


    Did you find this post helpful? Yes | No

    Default Re: LED Light Sensor - Need Help Please

    To use an LED as light sensor you can use PBP's RCTIME or if you want to use the analog approach try connecting the anode to the input pin and the cathode directly to vss, the following code gives me 0 at dark and ~450 in the light:
    Code:
    Inicio:
    suma=0
    for cont=1 to 10
    adcin 3,dato
    suma=suma+dato
    pause 100
    next cont
    suma=suma/10
    serout transmitir,0,[#suma,10]
    goto inicio
    (I'm using 5mm Ultra bright Blue LED)

    Regards.
    Last edited by ivanrosales; - 11th September 2011 at 01:06.
    My English doesn't sucks, it's just fugly...

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts