Shop OBEX P1 Docs P2 Docs Learn Events
HB-25 Motor Controller Code — Parallax Forums

HB-25 Motor Controller Code

Joe FishbackJoe Fishback Posts: 99
edited 2009-04-08 17:26 in Robotics
I have two HB-25 motor controllers and I trying to fiqure out some of the code. In the attached file that is from Parallax - "HB-25 Motor Test.bs2", I have a question. I understand how it works except for the·" Initialization " part. When the Basic Stamp powers up all the pins are inputs. The code says

·Do : LOOP UNTIL HB-25 = 1

What makes Pin 15 ( variable HB-25 ) equal 1 ?· Does the HB-25 controller sends back a signal on power up and if so how?

·Sorry I forgot to attach, here is the attachment


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
······ Joe Fishback

-Robots are my friends-

Post Edited (Joe Fishback) : 4/8/2009 1:35:27 PM GMT

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-04-08 16:03
    Joe,

    The HB-25 has an internal pull-up on the signal line. When powered up we can detect this and quickly initialize the HB-25. So when the pin is detected as HIGH the initialization begins. Until then it just sits in that loop. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • Joe FishbackJoe Fishback Posts: 99
    edited 2009-04-08 17:26
    Chris,

    Thanks, now I know.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ······ Joe Fishback

    -Robots are my friends-
Sign In or Register to comment.