2026-11-24 (3): Project, Message Based Architecture#

Project: Current Tasks#

Switch: libgpiod Implementation, Commandline Programs#

PWM: Commandline Program#

A commandline program to test our PWMPin abstraction, in its sysfs implementation. Like so …

$ 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 ⟶ 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.

I2C: Sparkfun QWIIC Button#

Goal: use a Sparkfun QWIIC Button as an alternative DWIM button, and blink it fancily when door moves.

../../../../../../../_images/qwiic-button.jpg

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.

Door: Message Based Architecture#

  • Look in currect state of “door” firmware

../../../../../../../_images/architecture.jpg