Shop OBEX P1 Docs P2 Docs Learn Events
Motor movment / as effect of sensors... — Parallax Forums

Motor movment / as effect of sensors...

ArchiverArchiver Posts: 46,084
edited 2004-03-02 22:23 in General Discussion
... Yes I am new..

Anyone know where I can learn about
causing a servo motor to move as an effect of a photoresistor /sensor?

I know how to cause motion in the survo using pulseout command.
What I want to do is track the sun.
I imagine the code would be a "loop"

DO
check sensor to see if value of pho-tonic energy is
= or grater than a stored "pho-tonic" number in memory.
then add 0002 to last stored pulsout command stored in memory.

how can I do this?
Learn to this?
Maybe educational cirriculum?

Thanks
Dave

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2004-03-02 22:23
    1. You want to interface a CdS photocell to
    the Stamp to measure light. Put the CdS cell
    inside a tube (or a dome with a slot cut in
    it), so it only gets light when
    it's pointing at the sun. See the
    Analog and Digital class for circuit.

    2. Put the dome on the servo, so it can be
    swung by the Stamp. Swing the dome so the
    light falling on the CdS cell is maximized.

    You already know how to do #2 above.

    --- In basicstamps@yahoogroups.com, "crazyidagain"
    <crazyidagain@y...> wrote:
    > ... Yes I am new..
    >
    > Anyone know where I can learn about
    > causing a servo motor to move as an effect of a
    photoresistor /sensor?
    >
    > I know how to cause motion in the survo using pulseout command.
    > What I want to do is track the sun.
    > I imagine the code would be a "loop"
    >
    > DO
    > check sensor to see if value of pho-tonic energy is
    > = or grater than a stored "pho-tonic" number in memory.
    > then add 0002 to last stored pulsout command stored in memory.
    >
    > how can I do this?
    > Learn to this?
    > Maybe educational cirriculum?
    >
    > Thanks
    > Dave
Sign In or Register to comment.