From 04df10db12f631dc015c99f99361c17c5c25d850 Mon Sep 17 00:00:00 2001 From: Ioana-Maria RADOVICI <ioana_maria.culic@upb.ro> Date: Wed, 19 Mar 2025 09:34:59 +0000 Subject: [PATCH 1/3] Added reminder LED and button wiring. --- website/lab/03/index.mdx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/website/lab/03/index.mdx b/website/lab/03/index.mdx index f21582b..4c0cd68 100644 --- a/website/lab/03/index.mdx +++ b/website/lab/03/index.mdx @@ -478,6 +478,8 @@ loop { :::info If you need to remember the layout of the board, check the [Lab Board](./02#the-lab-board) section from the previous lab. + +Remember that LEDs are wired so they light up on LOW and turn off on HIGH and buttons return 0 when pressed and 1 when not pressed. ::: :::danger @@ -489,6 +491,8 @@ Please make sure the lab professor verifies your circuit before it is powered up - Make the LED change intensity from 0% to 100% in 10% increments every 1 second. (**1p**) :::info You should use the lab skeleton provided in the [Lab Repository](https://github.com/UPB-PMRust/lab-2025) as a starting point for your implementation. + +Make sure the main function never exits so you can see how the circuit behaves. ::: 2. Write a program using Embassy to control the led intensity using a potentiometer. The potentiometer is connected to an ADC-capable GPIO pin. The LED should change intensity based on the potentiometer's position. (**2p**) -- GitLab From 4d4b0d9a752012ae76f17f0b146e540706b2db0d Mon Sep 17 00:00:00 2001 From: Ioana-Maria RADOVICI <ioana_maria.culic@upb.ro> Date: Wed, 19 Mar 2025 10:54:05 +0000 Subject: [PATCH 2/3] Apply 1 suggestion(s) to 1 file(s) Co-authored-by: Alexandru RADOVICI <alexandru.radovici@upb.ro> --- website/lab/03/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/lab/03/index.mdx b/website/lab/03/index.mdx index 4c0cd68..d645ff2 100644 --- a/website/lab/03/index.mdx +++ b/website/lab/03/index.mdx @@ -479,7 +479,7 @@ loop { :::info If you need to remember the layout of the board, check the [Lab Board](./02#the-lab-board) section from the previous lab. -Remember that LEDs are wired so they light up on LOW and turn off on HIGH and buttons return 0 when pressed and 1 when not pressed. +Remember that LEDs are wired so they light up on `Level::Low` and turn off on `Level::Low` and buttons return `Level::Low` when pressed and `Level::High` when not pressed. ::: :::danger -- GitLab From b67424756a32b25c730c2e6f772b9f85db61c2ac Mon Sep 17 00:00:00 2001 From: Ioana-Maria RADOVICI <ioana_maria.culic@upb.ro> Date: Wed, 19 Mar 2025 10:54:50 +0000 Subject: [PATCH 3/3] Apply 1 suggestion(s) to 1 file(s) Co-authored-by: Alexandru RADOVICI <alexandru.radovici@upb.ro> --- website/lab/03/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/lab/03/index.mdx b/website/lab/03/index.mdx index d645ff2..26ec2a2 100644 --- a/website/lab/03/index.mdx +++ b/website/lab/03/index.mdx @@ -492,7 +492,7 @@ Please make sure the lab professor verifies your circuit before it is powered up :::info You should use the lab skeleton provided in the [Lab Repository](https://github.com/UPB-PMRust/lab-2025) as a starting point for your implementation. -Make sure the main function never exits so you can see how the circuit behaves. +Embassy will reset all the peripherals when the `main` function exists, that means `PWM` and `ADC` will stop. Make sure the `main` function never exits so you can see how the circuit behaves. ::: 2. Write a program using Embassy to control the led intensity using a potentiometer. The potentiometer is connected to an ADC-capable GPIO pin. The LED should change intensity based on the potentiometer's position. (**2p**) -- GitLab