Homework

Task 1

Using the sensor driver from L06 Task 1 (LED-based sensor driver):

  • Add a sensor root shell command with subcommands:

  • fetch - calls sensor_sample_fetch()

  • read - calls sensor_channel_get() and prints the result

  • info - prints the device name and ready state

  • Commit 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_error if missing or out of range

  • Use SHELL_CMD_ARG to enforce argument count

  • Commit and tag it l7-task2.