Zephyr Course 2026 by iomico
Homework
Task 1
Using the sensor driver from L06 Task 1 (LED-based sensor driver):
Add a
sensorroot shell command with subcommands:fetch- callssensor_sample_fetch()read- callssensor_channel_get()and prints the resultinfo- prints the device name and ready stateCommit and tag it
l7-task1.
Task 2
Using the custom extension API from L06 Task 2:
Expose the extension API as a shell subcommand (e.g.,
sensor set <value>)The command must validate its argument: print an error via
shell_errorif missing or out of rangeUse
SHELL_CMD_ARGto enforce argument countCommit and tag it
l7-task2.