Benjamin Cabé

Zephyr Weekly Update – Fixing the search experience

Zephyr Weekly Update - December 15, 2023

Zephyr Weekly Update - December 15, 2023

As a lot of folks are wrapping up for the holiday season, the Zephyr community hasn’t slowed down all that much last week and there were quite a few noteworthy additions that this blog post will be covering, including a pretty cool (albeit short!) demo video.

Improved documentation search experience

One of the top complaints I’ve heard ever since I became the documentation manager for the Zephyr Project is how it can sometimes be hard to find information in the project’s documentation. It’s certainly true that the search engine historically available on docs.zephyrproject.org isn’t always giving the most helpful results.

As of last week, a new search experience is available with Google Programmable Search now being the default search engine when browsing the Zephyr documentation.

The new engine is faster, much more tolerant to typos, and allows you to write advanced search queries that are more than just a couple keywords (ex. you may use double-quotes to keep words together, exclude keywords by using the minus sign, etc.).

Meta-categories such as “Code Samples”, “API reference”, etc. are also available for you to narrow down the list of search results to only the category of results you care about (if you feel a category is missing, btw, let me know!). See for example the screenshot below, with top 3 results to the query “toggle a GPIO” — they are exactly what you’d expect them to be, but should you want more concrete examples of how to toggle a GPIO, clicking the “Samples” tab (or the green label in the search results) will give you just that!

Search results for “toggle a GPIO” using the new search experience in docs.zephyrproject.org

💡 Pro Tip: Press / to quickly focus on the search box while navigating the documentation.

Capacitive touch sensor for ESP32

Capacitive touch sensors are a kind of specialized GPIO with dedicated circuitry that detects an approaching finger by measuring a variation in the capacitance of the circuit.

Espressif devices typically include support for capacitive touch, and PR #64931 just made it possible to access this feature in Zephyr! The new driver is a standard input driver and as such fits nicely in the now pretty rich input subsystem.

The dedicated Devicetree binding, espressif,esp32-touch exposes a variety of settings to adjust the sensitivity, configure the debouncing, etc.

Here is, for example, the full Devicetree overlay to enable touch detection on pin TCH8 of my M5Stack AtomS3:

#include <zephyr/dt-bindings/input/input-event-codes.h>
#include <zephyr/dt-bindings/input/esp32-touch-sensor-input.h>

&touch {
debounce-interval-ms = <30>;
href-microvolt = <2700000>;
lref-microvolt = <500000>;
href-atten-microvolt = <1000000>;
filter-mode = <ESP32_TOUCH_FILTER_MODE_IIR_16>;
filter-debounce-cnt = <1>;
filter-noise-thr = <ESP32_TOUCH_FILTER_NOISE_THR_4_8TH>;
filter-jitter-step = <4>;
filter-smooth-level = <ESP32_TOUCH_FILTER_SMOOTH_MODE_IIR_2>;

status = "okay";

touch_sensor_set: touch_sensor_0 {
channel-num = <8>;
channel-sens = <50>;
zephyr,code = <INPUT_KEY_0>;
};

};

And below is the code sample in action. If you’re not familiar with capacitive touch and a bit confused looking at the video, yes, this is indeed literally a single wire that’s being used as the input!

https://blog.benjamin-cabe.com/wp-content/uploads/2023/12/capacitive-touch-esp32-m5stack-atoms3-1.webm

Funnily enough, it took me about 30 seconds to get the sample to work, and probably 10 times more to videotape it! 😝

Boards & SoCs

BeagleBoard BeagleV®-Fire

Drivers

Miscellaneous

With the holiday season upon us, I will be back with the next update on January 5th. Hopefully I won’t be buried under thousands of pull requests to write about, but should that be the case I will do my best to highlight the most noteworthy ones!


A big thank you to the 12 individuals who had their first pull request accepted this week, 💙 🙌: @ryukoposting, @hellesvik-nordic, @sebastianschlupp, @kevinior, @aofrioWeifengLi, @VuDangBP, @BryanZhuAM, @AlessioLei94, @alelec13, @helen741, @Burt-Silverman, and @sateeshkotapati.

As always, I very much welcome your thoughts and feedback in the comments below!

If you enjoyed this article, don’t forget to subscribe to this blog to be notified of upcoming publications! And of course, you can also always find me on Twitter and Mastodon.

Catch up on all previous issues of the Zephyr Weekly Update:

Exit mobile version