.. include:: 2026-11-24 (3): Project, Message Based Architecture =================================================== Project: Current Tasks ---------------------- .. topic:: Timeline **Please complete until Mon 2026-11-30** Switch: ``libgpiod`` Implementation, Commandline Programs ......................................................... * ``LibGPIODSwitch``: pull request already merged * Pending: commandline programs for ``LibGPIODButton`` and ``LibGPIODSwitch``. Much like ``gpioget`` and ``gpioset``; see https://manpages.debian.org/experimental/gpiod/gpioget.1.en.html and https://manpages.debian.org/experimental/gpiod/gpioset.1.en.html, but using our Button/Switch abstractions instead. PWM: Commandline Program ........................ A commandline program to test our ``PWMPin`` abstraction, in its ``sysfs`` implementation. Like so ... .. code-block:: console $ henhouse-pwm /sys/class/pwm/pwm0 1000000 20000 ^^path to pwm channel ^^period ^^dutycycle If we can see the effect of this with a scope, then we can be confident that we can use it with the motor. Hook Raspi Into IoT Network ........................... * Provide parameters for Wifi |longrightarrow| see if it works * **IMPORTANT**: if not works, cry for an alternative **Followup Steps** * Create accounts for everybody (-> jfasch). Groups ``gpio``, ``pwm``, ``i2c`` * Remote desktop (-> pfister) Project: Future Tasks --------------------- To continue with the inevitable grading (and possibly have fun too), lets see what else can be done. .. _2026-11-24-qwiic: I2C: Sparkfun QWIIC Button .......................... .. topic:: See also * :doc:`/trainings/material/soup/linux/hardware/i2c/topic` **Goal**: use a *Sparkfun QWIIC Button* as an alternative DWIM button, and blink it fancily when door moves. .. image:: ../2026-11-16/qwiic-button.jpg * `Sparkfun QWIIC Button `__ * `SparkFun Qwiic Button Hookup Guide `__ * :download:`Register map (PDF) ` CAN Bus: Outgoing FSM State Change Notifications ................................................ Send away CAN frames (via a Pi CAN hat, to be ordered), to some "display" or another party who might be interested. CAN Bus: Incoming Command (Like "Open", "Close", "DWIM") ........................................................ Receive incoming frames, and react accordingly. Feed command into the FSM message queue, just like the "commandline thread" and "PLC thread" do. .. _fh-2026-11-24-message-based-architecture: Door: Message Based Architecture -------------------------------- .. topic:: See also Refer to the code example in :ref:`2026-11-23-message-based-arch` * Look in currect state of "door" firmware .. image:: architecture.jpg :scale: 130%