This Week in Beagle #23

Hello everyone. A typical work week. Let’s go over everything.

PocketBeagle 2 Examples

More work went to make the PocketBeagle 2 Examples as educational as possible. The goal of the examples is to teach Linux APIs. Thus the examples try to use the kernel drivers for the different devices as much as possible.

Make Blinky example lower level

The Blinky example now uses the sysfs entries in the example file. This should help people understand the sysfs LED subsystem interface.

Make Seven Segments example lower level

The Seven Segments example now uses the sysfs entries in the example file. This should help people understand the sysfs Seven Segments interface.

Add more RGB LED Examples

The initial RGB LED example produced different color hues using the pwm-leds-multicolor driver. However, this was a bit overwhelming when converting to sysfs abstractions. This is because there are quite a few sysfs entries for Multicolor LEDS. So it was decided to add some more straightforward examples for the device.

Fade Brightness

The fade brightness example uses the brightness sysfs entries to perform a PWM fade for a single color in the RGB LED. This helps show how the brightness sysfs entry affects the RGB Led.

Fade Intensity

The fade intensity example uses the multi_intensity sysfs entry to perform a PWM fade for the single color in the RGB LED. This helps show how multi_intensity can be used to simulate the same behavior as the brightness sysfs entry.

Color Circle

The color circle example demonstrates generating different colors in the color circle. It only generates basic colors, instead of the different color shades.

Hue

The hue example is the original RGB LED example, and generates various color hues in the RGB LED, giving a nice visual appearance.

Use GPIO Keys for Buttons

In the original examples, I was using libgpiod to read Techlab Cape button inputs. However, I have switched the new examples to use GPIO keys. The buttons now emit RIGHT and LEFT keycodes.

Make EEPROM example lower level

The EEPROM parsing is not handled in the example itself rather than hiding in the beagle_helper. This allows the example to serve as a good demonstration of how to parse ffi structures in Rust and Python.

Use PWM Beeper driver for Buzzer

The Buzzer example now uses the PWM Beeper driver, which allows interacting with the character device, similar to GPIO Keys.

Send v3 of Export Symbols patch

I have sent Patch v3 for Export Symbols. I will also be sending a patch for Beagle Capes soon. The reason for Beagle Capes over MikroBUS is that the capes have a much cleaner history with upstream patches. Additionally, I have a cape that exposes a MikroBUS port (TechLab Cape), which should help ensure that board chaining works well.

Allow specifying Debian package name in Cargo Packager

I have been using a patched version of Cargo Packager for bb-imager-rs since it was missing some features. Since the patch to disable Linux desktop entry has been merged, I have created a PR to allow manually specifying the name for Debian packages. Once it is merged, I can go back to using the upstream cargo packager.

Ending Thoughts

This was it for this week. Hopefully, this helps bring transparency regarding where the development efforts are concentrated, and how the community can help. Look forward to next update.

Helpful links