Shop OBEX P1 Docs P2 Docs Learn Events
Test — Parallax Forums

Test

gumo05gumo05 Posts: 3
edited 2017-10-09 02:10 in BASIC Stamp
Test

Comments

  • T ChapT Chap Posts: 4,223
    edited 2007-03-24 04:56
    What kind of motor? The basic idea is, a code is running that moves the motor, whether PWM commands to a DC motor, or step instructions to a stepper. If the limit switch puts a 1 or 0 to a pin, the code stops.

    Post Edited (TChapman) : 3/24/2007 5:08:49 AM GMT
  • gumo05gumo05 Posts: 3
    edited 2007-03-24 05:12
    its just a DC motor, I think i need a Hbridge 2 go through the dc motor though...
  • gumo05gumo05 Posts: 3
    edited 2017-10-09 02:10
    test
  • T ChapT Chap Posts: 4,223
    edited 2007-03-24 05:16
    Ok, if the code says run the motor at some speed, after setting the the code can look for a pin state change, maybe the pin is held high by a 10k pull, the limit switch shorts it to ground, presenting a 0 at the pin. There are STamp versions that have an interrupt that could look for the switch behind the scenes, so the code can be doing other things.

    I would suggest you start from the beginning by looking for a document here called "What's a Microcontroller?"

    Detecting a limit switch is the simplkest thing that can be done, but I suspect you need some background first. Study the download I just mentioned and your question will be answered.

    This is the powerpoint version, I am looking for the text

    www.parallax.com/html_pages/edu/downloads/wam_pres.asp

    Here is the text DL version:

    www.parallax.com/dl/docs/books/edu/wamv2_2.pdf

    Post Edited (TChapman) : 3/24/2007 5:25:24 AM GMT
Sign In or Register to comment.