Class PFLink

    • Constructor Detail

      • PFLink

        public PFLink​(I2CPort _Port,
                      int address)
      • PFLink

        public PFLink​(I2CPort _Port)
      • PFLink

        public PFLink​(Port _Port,
                      int address)
      • PFLink

        public PFLink​(Port _Port)
    • Method Detail

      • initialize

        public void initialize​(byte _Range)
        Should be called once to set up the NRLink for usage in the program
        Parameters:
        _Range - Either NR_RANGE_SHORT or NR_RANGE_LONG, which uses more power
      • runCommand

        public void runCommand​(int command)
        Executes a command
        Parameters:
        command -
      • installMacro

        public void installMacro​(int _Address,
                                 byte[] _Macro)
        Installs a macro into the NRLink You really should call this only once for a new NRLink since it stores them in EEPROM even if turned of. And I have no idea how often you can overwrite them before they burn out...
        Parameters:
        _Address - The address up from 0x40 for the macro
        _Macro - The macro
      • installDefaultMacros

        public void installDefaultMacros()
        Installs the macro definitions used by this class. You really should call this only once for a new NRLink since it stores them in EEPROM even if turned of. And I have no idea how often you can overwrite them before they burn out...
      • runMacro

        public void runMacro​(int _Address)
        Runs a macro which has been previously installed on the NRLink.
        Parameters:
        _Address - The address of the macro, one of the MOTOR_* for a single motor or one of the COMBO_* macros which work on both motors simultaneously