GPIO ports

Nodes: ghanta nav com ifc | Module: controls.gpio | Parameters: controls

The module provides node’s GPIO signals management:

  • configure GPIO physical driver parameters and mode;
  • output digital signal depending on mandala variable value;
  • measure signal input parameters and output to mandala variable;

This module works in combination with controls module to provide PWM output for servos.

The multiplier mult is applied always before bias, for both inputs and outputs when applicable.

Configuration parameters

  • controls
    • gpio

      GPIO Mapping

      • mode Gpio pin mode option [off,OUT,OUT_PWM,OUT_DUTY,OUT_PULSE,IN,IN_FREQ,IN_WIDTH,IN_DUTY,IN_SET]
        • off - the port is shutdown (floating);
        • OUT - the port is configured as logical output;
        • OUT_PWM - outputs PWM signal for servos;
        • OUT_DUTY - outputs PWM signal with controllable duty cycle;
        • OUT_PULSE - outputs logical pulse(s) with controllable frequency and width;
        • IN - measures logical level [0/1];
        • IN_FREQ - measures signal frequency [Hz];
        • IN_WIDTH - measures pulse width [s];
        • IN_DUTY - measures duty cycle [1];
        • IN_SET - measures logical level and sets the binding variable on high level only;
      • inv Signal inverted option

        When this option is on - the physical TTL level [0/1] of the pin is inverted.

        • inputs: level is inverted before processing,
        • outputs: level is inverted after processing, before applying.
      • bind Binded variable bind
        • inputs: the measured value will be stored in this variable and broadcasted to network, this parameter is mandatory for inputs;
        • outputs: the value of the variable will be applied immediately to the port logic. If this parameter is omitted - the channel of controls module output is used as value when assigned, i.e. the ch of control must be equal to the gpio port number, starting from 1;
      • mult Value multiplier real
        • OUT, OUT_PWM, OUT_DUTY: variable value is multiplied by this factor;
        • OUT_PULSE: if this parameter is set more than bias - the pulse will be emitted with the set period [s], otherwise, the pulse will be shot just once. The pulse will be emitted when the bind value is more than zero. Use cases:
          • engine starters;
          • strobe lights;
        • inputs: measured value is multiplied by this factor;
      • bias Value bias real
        • outputs: variable value, after multiplying by mult is adjusted with the value of this parameter before applying to TTL logic;
        • inputs: this parameter is added to measured value, after applying the mult;
      • label User description string

        Used for display/notes purposes only, as the value is stored in node and can be shared within the crew as a comment.