From 32294bcc4d07d91735300a3a7aff4511617cec8c Mon Sep 17 00:00:00 2001 From: Constandachi Date: Wed, 13 Nov 2024 12:06:32 +0200 Subject: [PATCH] Explanatory comments Signed-off-by: Monica Constandachi --- examples/workshop/exercise_2.py | 6 ++++-- examples/workshop/exercise_3.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/examples/workshop/exercise_2.py b/examples/workshop/exercise_2.py index 33322fdc6..28aa8ffb4 100644 --- a/examples/workshop/exercise_2.py +++ b/examples/workshop/exercise_2.py @@ -60,9 +60,11 @@ # EXERCISE 2: Power the RGB LED -colors = ["red", "green", "blue"] +# ad74413r.channel["voltage0"].raw controls red +# ad74413r.channel["voltage1"].raw controls green +# ad74413r.channel["voltage2"].raw controls blue -# Set LED to red, green and blue color +# Set LED to red, green and blue color # Your code goes here diff --git a/examples/workshop/exercise_3.py b/examples/workshop/exercise_3.py index 09740390f..5e87deac8 100644 --- a/examples/workshop/exercise_3.py +++ b/examples/workshop/exercise_3.py @@ -70,7 +70,7 @@ red_channel_val = (resistance / 11000) * AD74413R_DAC_MAX_CODE # Your code goes here - # Assign the value of potentiometer value to the adc channel + # Assign the value of potentiometer value to the adc channel (ad74413r.channel["voltage0"].raw)