Forum >Replies by DanW
Replies (3)
  • You Reply: ok, I kind of solved this.
    In theory, something like the code below is what's needed.
    Code: Select all
    GT.Socket socket = GT.Socket.GetSocket(socketNumber, true, this, null);
    socket.EnsureTypeIsSupported('Y', this);
    Cpu.Pin[] pins = socket.CpuPins;
    Cpu.Pin pin = pins[3];
    uint[] time = new uint[] { 500 * 1000, 500 * 1000 }; // Not Correct for servos
    GHI.IO.SignalGenerator servo = new GHI.IO.SignalGenerator(pin, false);
    servo.Set(false, time, 0, 10, true);
    
    The time array represents a digital waveform. I have no idea how to represent the appropriate servo signal in a waveform but if I figure it out I will write a driver for this module.
  • You Reply: It seems that you may not properly understand the question/issue.

    There is no specific "Servo Library" just standard NETMF code which usually work but not with this particular module. (Because of the reasons previously described)

    If it is possible then why not try it yourself and post the working NETMF/Gadgeteer code?

  • You Reply: Thank you for the reply.

    The examples you provided are controlling one servo from one module. The DFRobot Servo Motor Expansion Module provide seven digital IOs.

    I have accomplished controlling a servo (with NETMF) that's connected through a breadboard or Extender module. However this code does not work for the Servo Motor Expansion Module because it doesn't distinguish between the seven IOs.