GPIO Servo control

Discussion in 'UDOO X86' started by Z171, Apr 2, 2017.

Tags:
  1. Z171

    Z171 New Member

    Joined:
    Oct 2, 2013
    Messages:
    6
    Likes Received:
    0
    Hi everybody,
    I was wondering if there already is any kind of library for high-level GPIO manipulation for controlling servos [in C Java, Python, it doesn't really matter since I can always open a socket to interface the script to my project], are you aware of anything similar?
    I would really like to implement my own, but my due is near and I would prefer to rely on something that has already been tested rather than my own code...
    Thank you for your help
    Matteo Formenti
     
  2. Markus Laire

    Markus Laire Active Member

    Joined:
    Mar 9, 2017
    Messages:
    225
    Likes Received:
    91
    Just an idea: You could try finding Arduino Servo library for Arduino 101, instead of UDOO library, and then use Arduino-side to control the servo. And if you do need to control it from UDOO, you could create a small Arduino Sketch which just relays commands from UDOO to Servo.
     
  3. Z171

    Z171 New Member

    Joined:
    Oct 2, 2013
    Messages:
    6
    Likes Received:
    0
    Ho,
    Thanks for your reply, the problem is that the servo is really time sensitive, and the Arduino 101 has to perform a heavy and time consuming task concurrently. (The Arduino is trying to mimic a LIDAR, and the UDOO is controlling the car engine and steering system. A single loop of the Arduino could take a couple of milliseconds when no data is required, or about 110 milliseconds when a scan is requested)
    I also thought about interrupts, but in my experience, they never work 100% as you expect and i also don't have spare pins.
     
    Last edited by a moderator: Apr 3, 2017

Share This Page