Entries by Mike Szczys

Add Custom Kconfig Symbols in Zephyr

I needed to build 15 sets of the same firmware, but pass three unique variables for each copy. Zephyr has a solution for this: the Kconfig system. You can declare your own custom symbol, then set the value by passing a command line argument at compile time. Here’s how to do this with your own projects.

Better IoT design patterns: Desired state vs. actual state

With a bit of planning, you can make sure that your IoT devices stay in sync with the cloud and behave in a predictable way for your users. The concept uses a “desired state” that is watched by the device for changes from the cloud. The device then reports back its actual state as a separate collection of data.

How to parse JSON data in Zephyr

Parsing JSON packets with strings and punctuation delimiters doesn’t sound like much fun on a microcontroller. That’s why it’s really nice that Zephyr has a built-in JSON library. In this post and video we show you how to use it on your data from the cloud.

Debugging Zephyr for Beginners: printk() and the Logging Subsystem

Zephyr has a number of tools to aid in debugging during your development process. Today we’re focusing on the most available and widely useful of these: printing message to a terminal and enabling logging messages. New to Golioth? Sign up for our newsletter to keep learning more about IoT development or create your free Golioth […]

How to build your Zephyr app in a standalone folder

If you’re like me, you installed Zephyr and began making your own changes to the sample applications that came with the toolchain. But at some point–either for personal project repository tracking or building out a professional project–your program starts to take shape. You want to move it to its own standalone directory. It’s not immediately […]

How to Set Up ESP32 GPIO Pins in Zephyr

Getting your ESP32 GPIO pins working with Zephyr is easy, and using a devicetree overlay file to do so makes it painless to change pins (or even boards/architectures) in the future. Today we’re looking at a simple overlay file for the ESP32 architecture and talking about the syntax used to choose input and output pins. […]