Class MSC

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, SensorConstants, SensorMode, SensorModes, SampleProvider

    public class MSC
    extends I2CSensor
    This class has been designed to manage the device MSC8, Mindsensors NXT Servo which manages up to 8 RC Servos. For example, do: msc.servo1.setAngle(angle) to set the angle of the servo at location 1. Many thanks to Luis Bunuel (bunuel66@hotmail.com) in Testing process
    Author:
    Juan Antonio Brenha Moral
    • Field Detail

      • servo1

        public MServo servo1
        Servo at location 1
      • servo2

        public MServo servo2
        Servo at location 2
      • servo3

        public MServo servo3
        Servo at location 3
      • servo4

        public MServo servo4
        Servo at location 4
      • servo5

        public MServo servo5
        Servo at location 5
      • servo6

        public MServo servo6
        Servo at location 6
      • servo7

        public MServo servo7
        Servo at location 7
      • servo8

        public MServo servo8
        Servo at location 8
    • Constructor Detail

      • MSC

        public MSC​(Port port)
        Constructor
        Parameters:
        port - the NXTServo is connected to
      • MSC

        public MSC​(I2CPort port)
    • Method Detail

      • getServo

        public MServo getServo​(int location)
        Method to get an RC Servo in from the NXTServo
        Parameters:
        location - location of the servo (from 1 to 8)
        Returns:
        the MServo object
      • getBattery

        public int getBattery()
        Read the battery voltage data from NXTServo module (in millivolts)
        Returns:
        the battery voltage in millivolts