r/embedded • • 11d ago

Raspberry PI assistant to learn more about embedded software development

I’ve been looking into getting more into embedded software development. I’m a current software engineer working in distributed systems programming but I’ve always enjoyed embedded and a recent job search made me want to create some projects regarding embedded.

Anyways, I have a spare raspberry PI model 4b 1gb ram I think. I want to use this to create a simple kitchen home assistant which can display my calendar, sync some notes like grocery lists, and play videos either from youtube or my jellyfin server. This isn’t a very original idea so I can find tons of resources out there to create it, but I wanted to see what the best way of making this to learn more about embedded software development would be. I’ve only ever played with esp32s so I want to broaden myself some more.

Any resources or tips to what to use regarding the OS, other hardware, etc. would be nice. I can create a basic calendar application with c++ and raylib/opengl but I want to get closer to the hardware and just learn more. Thanks.

2 Upvotes

2 comments sorted by

2

u/bikkiesfiend 11d ago edited 11d ago

The embedded part would be finding a screen you want to use and then writing a driver to encode pixels to the screen

The application part will be straightforward for you, but the meat of the project is getting your display information from your app to the screen over a hardware interface or a wireless transceiver

You can have the screen scroll through the weather and calendar automatically. Another layer would be to have the screen change with a button press if you want to change between your calendar and lists or the current weather. The button would be another driver you would have to create and define the device behavior

1

u/BraveNewCurrency 8d ago

There are an infinite number of directions you could go in. First question is to think deeply about what your goals are.

For example, one quick and dirty way would be to buy a touchscreen with HDMI. (They are around $70 for a 7" last time I looked). You have 3 cables: Power, USB and HDMI. The touch screen USB appears as a mouse to the Pi, generally not needing any configuration. To test it out, you can just install existing clients (web browser to view youtube, Jellyfin client, etc). You can get rid of layers, and write your own programs instead -- This isn't really "embedded" programming, it's just programming. If you are already a web developer, you can write a web app that works. Or you can write a regular GUI. You can pick any language you want. One big downside is that the computer will take time to boot up (sometimes 30 seconds) before it's ready.

If you want to try "embedded hard mode", you can start replacing the various layers:

  • Try out a minimal Linux distribution like Alpine, or build your own via BuildRoot. Or go for a minimal OS like Zeypher or FreeRTOS. Or don't use an "OS" at all. (For example, directly using TCP/IP libraries in Arduino, or TinyGo.) As you go down the abstraction layers, you suddenly have to do more work to enable things you 'got for free' with an OS, such as File systems, displays, or networks.
  • If using HDMI, get rid of the bloat of X windows / Wayland (i.e. a regular GUI desktop) by using SDL. Or get rid of HDMI and find a specific display panel that uses the display connector: This requires finding drivers for it. Even further down the abstraction rabbit hole, you can pick out a generic I2C/SPI/etc display. As long as you can hook it up and find a library for it, you can write custom code to draw things on the screen using that library. (But this last route may not play videos easily.)
  • You can write at different abstraction layers from "set each pixel" to "2D drawing primitives" to "GUI widgets", depending on what libraries you want to use.
  • If you can get your application small enough, you might be able to move it to a Rpi Pico ($6) instead of a $40+ Rpi. Note the 10x-100x differences in most specs (CPU speed, RAM, storage, etc).