serial program and sensor problem


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1
    win_832001's Avatar
    win_832001 Guest


    Did you find this post helpful? Yes | No

    Question

    TQ for the reply. actually i wrote this program for servo turn from 0 degree-90 degree. and the from 90 degree to 0 back. so the servo is only have to turn like that. so i'm not to modified the servo instead using standard servo.

    for the instruction :
    val=0
    For val=0 TO 80
    PulsOut PORTB.3,150 ' - servo rotate from 0 degree-90 degree

    the problem came on this:
    IF IRSwitch =1 Then
    Pause 1000
    GoSub CloseGate 'when the sensor =1 (this part is not working)
    EndIF
    GoSub Main


    For val=0 TO 80
    PulsOut PORTB.3,50 'servo rotation - servo rotate from 90 degree-0 degree:

    this instruction is working with servo is rotate but the problem is i need to send the data to make the servo run.

    actually, the things that i want is to the sensor =1 and no serial input to make the servo turn.

    tq for help me..

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Unhappy Servo command common values

    Hi, Win

    Servos pulses HAVE to respect those values ...

    700 to 2300 µS high level @ 20 to 60 Hz

    Not to create mechanical or electrical damage.

    Sometimes it's possible to try a wider range, but it doesn't fit all brands ...

    Your 50 value is out of range !!!

    Just try a value in the 70 - 230 range ...

    Note also the " @ 20 to 60 Hz " ... the pulse has to be sent every 50 to 15 ms ...

    Alain

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    win_832001's Avatar
    win_832001 Guest


    Did you find this post helpful? Yes | No

    Default

    oooo...really..TQ for the reply..i'll try the value for the servo..

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