Home Forums EasyTransfer Library Support Forum Servo twitch issue

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #2942

    I’m happy to use your library. It works great for my last 48RGB LED progect.
    But last two days I try to use your library together with
    2 APC220 modules (transparent serial modems) connected to arduino RX/TX and servo-motor.
    Servo controlled with default Servo.h library.

    From TX side we have:
    Arduino Mega2560 + potentiometer;

    From RX side:
    Arduino Duemilanove (AtMega328PU) + 1 green LED + Turnigy 9g servo motor connected to PWM9.

    The problem is that when I connect a LED it works fine and changes brightness accordingly to send data.
    But when I connect Servo it starts twitch (work around set position for 10 degree left right with ~16Hz frequency).

    I tested all possible methods. Started program on different arduino controllers (mega1280, mega2560, duemilanove),
    started serial on default port and used newsoftserial library to start it on non-default ports. changed loop delay on RX and
    TX side, changed delay to millis() timer. But it didn’t solve my problem.

    Now my APC220 serial and radio speed set to 19200 b/s. It’s pretty fast and works like in realtime (when I drive LED).
    I tested code with other different combinations like before:
    serial speed: 57600; radio speed: 9600 (from many quadcopter community recommendations)
    serial speed: 9600; radio speed: 9600
    But it still twitches.
    I can make servo work correct (and don’t walk around it’s position) only if I disable easytransfer in my sketch at all.

    Explain me please can this problem be caused by Serial interrupts or smth like this because I worked for 20 hours and still not able to make servo react smoothly.

    here’s my code example:

    With best regards
    Odessa, Ukraine


    The problem have place for <SoftEasyTransfer.h> only.
    Please fix the library.

    P.S. if I have enough time I can help you on weekend.


    The issue is not the library, it’s you trying to use a software serial port at the same times as creating a servo signal. Switch to using the hardware serial port on the Duemilanove (pins 0 and 1) and the problem should go away.

    Running a servo requires precise timing. Using a software serial port interrupts timing on the Arduino. You can’t use both.


    Maybe you are right. btw. thanks for good library.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.