Home 2018 Forums Crumble Support Multiple Servo Question

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #3466
    lebanoncircle
    Participant

    I’m wondering if this is possible, I have two servos that require 4 inputs from an RC.

    Button A – Servo 1 Left
    Button B – Servo 1 Right
    Button C – Servo 2 Up
    Button D – Servo 2 Down

    I have the RC successfully controlling servo 1 which is attached to output C.

    Servo 2 is attached to output D but as far as I can see there’s no way of providing an input to operate it as all 4 I/O ports of the board are occupied.

    Am I correct or is there a way to do it?

    Thanks in advance!

    #3476
    Joseph
    Keymaster

    Hi,

    You might be able to achieve this by using the buttons to connect different resistors from + to an input. You would then need to read in the analog value and check to see if it is a certain range.

    If you just need to connect two buttons to each input, you could wire a 100k resistor permanently from the input to +, this will cause the analogue input to read about 128 (there is a 100k resistor connecting the input to ground, or -, on the Crumble). You could then connect one button from the input to – and the other button from the input to +. The program is slightly simpler because you can check if an analogue input is below a value for the first button, or above a value for the second.

    I’ve attached a simple program for one input.

    I hope this makes sense! Let me know if you need a better explanation 🙂

    Joseph

    Attachments:
    You must be logged in to view attached files.
    #3478
    lebanoncircle
    Participant

    Thanks for the response Joseph! I’ll give this a go for sure and let you know how I get on!

    #3503
    lebanoncircle
    Participant

    I’ve given this a go with no real luck. I may have read your instructions wrong but this is what I have done…

    From the RC circuit

    Button A wired to Crumble input A
    Button B wired to Crumble input B
    Button C wired to 100k resistor to Crumble input A
    Button D wired to 100k resistor to Crumble input B

    I might need that better explanation after all!

    Not really related to the above but I’m also getting huge amounts of jitter on the servos. Do you have an tips?

    Thanks in advance!

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