Skip to content

SW_DevRPiCtrl

Rolf Obrecht edited this page Aug 21, 2024 · 17 revisions

Device Module "RPiCtrl"

Module Information

System

System Comments
RPi All boards with Raspberry Pi OS
PC Linux n/a
PC Windows n/a
Mac n/a

Dependencies

Python
Module
Install Anaconda
pigpio pip install pigpio conda install pigpio

Command Line Arguments

None.

Config File Parameter

Parameter Default Type/Range Description
pin_number_switch 0 number GPIO# of pin connected to number switch of CCU (use a pullup resistor 10kOhm to 3.3V); if 0, use kbd dialling
inv_number_switch true false / true If true, use inverted signal on pin
pin_button_AT 0 number GPIO# of button AT (optional) Button connects to GND
pin_button_ST 0 number GPIO# of button ST (optional) Button connects to GND
pin_button_LT 0 number GPIO# of button LT (optional) Button connects to GND
pin_button_1T 0 number GPIO# of Single button (optional), press button 1T repeatedly to cycle through states Offline, Active, WB
pin_button_PT 0 number GPIO# of power button PT (optional) Button connects to GND
delay_AT 0 non-neg. int delay in seconds before reacting on button AT pressed
delay_ST 0 non-neg. int delay in seconds before reacting on button ST pressed
pin_LED_A 0 number GPIO# of LED indicating state „A“ ; LED connects to GND (1kOhm in series!)
pin_LED_WB 0 number GPIO# of LED indicating state „WB“ ; LED connects to GND (1kOhm in series!)
pin_LED_WB_A 0 number GPIO# of LED indicating state „WB_A“ ; LED connects to GND (1kOhm in series!)
pin_LED_LT 0 number GPIO# of LED indicating Local Mode ; LED connects to GND (1kOhm in series!)
pin_LED_status_R 0 number GPIO# of RED status LED ; LED connects to GND (1kOhm in series!)
pin_LED_status_G 0 number GPIO# of GREEN status LED ; LED connects to GND (1kOhm in series!)
pin_LED_Z 0 number GPIO# of LED indicating status "Z" and "ZZ"; LED connects to GND (1kOhm in series!)
LED_Z_heartbeat 6 number defines heartbeat duty cycle for LED_Z, off if set to 0 (=> LED_Z always on), otherwise LED_Z is turned off for (LED_Z_heartbeat * 500ms) and on for 500ms
pin_power 0 number GPIO# of pin for power (save) relay / SSR
inv_power false false / true If true, use inverted signal on pin
pin_button_U1 0 number GPIO# of button user1 (optional) Button connects to GND
text_button_U1 "RY" string text to print if button user1 is pressed
pin_button_U2 0 number GPIO# of button user2 (optional) Button connects to GND
text_button_U2 "RYRY ... RY" string Text associated with button user2
pin_button_U3 0 number GPIO# of button user3 (optional) Button connects to GND
text_button_U3 "#" string Text associated with button user3
pin_button_U4 0 number GPIO# of button user4 (optional) Button connects to GND
text_button_U4 "@" string Text associated with button user4

Description

This module is only useful when running PiTelex on a RPi, and contains no hardware driver like RPiTTY; in fact, it enables the use of several GPIO-pins of the RPi for extended control.

Especially when using piTelex without a CCU, its functions (and UI) must be replicated by piTelex. This module provides you with the required features.

To make use of its functions, create a device entry in the config file (Default: RPiCtrl) that points to this module and enable it.

  • pin_button_[AT|ST|LT]: Pressing pushbuttons connected from these pins to ground will switch piTelex to the corresponding state: AT to start an outgoing call, ST to end a connection, LT to enter local mode.

  • If dialing with number switch, it can be connected to pin_number_switch.

    Hint: Set pin_number_switch of module RPiTTY to -1 in this case.

  • button_1T is a special variation of the above buttons. Pressing it repeatedly will cycle through the states AT,ST,LT,off

  • pin_LED_[WB|A|WB_A] allow to connect LED's for signalisation of the respective states

    • WB - ready to dial ("Wählbereitschaft")
    • A - Active (Connected or in local mode)
    • WB_A - LED lit in states A and WB
  • pin_LED_status_[R|G] are meant to connect to a dual LED (red/green) which delivers more detailed information about piTelex' states by combining different brightness levels of the two LED colors.

    Hint: All LED's must have a resistor of 500-1000 ohms in series, depending on the LED type.

  • delay_[AT|ST] allows to insert a delay from pressing 'AT' or 'ST' to altering the state to 'WB' or 'Z'. This is just to give the system e more realistic "feel"

  • pin_power as an output pin is used to control a power relay /SSR for switching mains power of the connected system (CCU and/or teletype) and is meant for power saving by switching off the equipment when not in use

  • pin_button_PT allows to switch the connected equipment on or off manually; toggles the state of pin_power.

  • pin_LED_Z together with LED_Z_heartbeat can be used for monitoring of piTelex. As long as LED-Z is flashing in Standby ("ZZ"), piTelex is healthy, up and running.

  • pin_button_U[1..4] Allow you to create hardware shortcut buttons. Pressing push buttons connected from these pins to ground will output the corresponding text defined in text_button_U[1..4].

Clone this wiki locally