
Read a Button on Raspberry Pi Pico With the Pico SDK
Wire a button to a Raspberry Pi Pico, enable the pull-up with gpio_pull_up and read it with gpio_get in C using Pico SDK 2.0, with CMake and expected output.
Tag
362 posts

Wire a button to a Raspberry Pi Pico, enable the pull-up with gpio_pull_up and read it with gpio_get in C using Pico SDK 2.0, with CMake and expected output.

Build a small KVM hypervisor in C that loads a flat 16-bit guest binary, serves a serial port and a result port, counts exits and halts cleanly.

Convert numbers between binary, decimal and hexadecimal on paper with place values, repeated division and nibble grouping, then check the result in C.

Load an eBPF classifier with tc and cls_bpf on ingress or egress using a clsact qdisc, return TC_ACT verdicts, and see how tcx replaces it on Linux 6.6.

Make a C thread sleep until another signals that work is ready with pthread_cond_wait, pthread_cond_signal and a predicate loop on Linux with glibc 2.41.

Write an RTEMS 6 program with the Classic API, an Init task, rtems_task_create, rtems_task_wake_after and a confdefs.h configuration, then build and run it.

See what zombie and orphan processes are, how each one appears in ps on Linux, why a zombie cannot be killed, and how to fix the parent that causes it.

Learn the three AVR port registers on an ATmega328P: DDRx sets direction, PORTx drives output or the pull-up, PINx reads and toggles, with avr-gcc examples.

Learn what octal is, how three bits map to one octal digit, and why chmod 755 and the C leading zero still use base 8 on Unix systems today.

Count packets per source IPv4 address in an XDP program with a BPF hash map, then read and print the totals from a libbpf user-space program.

Use GDB's print, display, ptype and info locals to read scalars, arrays, structs and pointers, and change output with format letters, @ slices and set print.

Build an RTEMS 6 toolchain with the RTEMS Source Builder, then compile the kernel and a BSP with Waf, using the SPARC erc32 simulator target as the example.