Class PiconZeroMotor

    • Constructor Detail

      • PiconZeroMotor

        public PiconZeroMotor​(PiconZero piconZero,
                              int motor)
    • Method Detail

      • forward

        public void forward​(float speed)
                     throws RuntimeIOException
        Set the motor direction to forward at the given speed.
        Parameters:
        speed - normalised speed value, range 0..1
        Throws:
        RuntimeIOException - if an I/O error occurs
      • backward

        public void backward​(float speed)
                      throws RuntimeIOException
        Set the motor direction to backward at the given speed.
        Parameters:
        speed - normalised speed value, range 0..1
        Throws:
        RuntimeIOException - if an I/O error occurs
      • getValue

        public float getValue()
                       throws RuntimeIOException
        Get the relative output speed of the motor in the range -1..1
        Returns:
        -1 for full reverse, 1 for full forward, 0 for stop
        Throws:
        RuntimeIOException - if an I/O error occurs
      • close

        public void close()
        Close this device