Question: Connect 3 LED's ( GPIO ) , 2 Push buttons ( EXTI ) , and voltage divider ( R 3 = 1 k and R

Connect 3 LED's (GPIO),2 Push buttons (EXTI), and voltage divider (R3=1k and R5=10k||R6=10k) to the proper pins of the microcontroller. WARNING: Show the lector, before connecting to USB.
Setup.
Setup Microcontroller pinout and all microcontroller settings:
1.16 Add a User Label for GPIO with your initials as an example LED_GREEN_VZ.
1.17 Setup GPIO EXTI interrupt for reacting on the falling edge of the push buttons.
1.18 Set up ADC for reading data using the pooling method.
1.19 Setup Timer blinking AND reading.
1.20 Setup UART for speed 57600 with 8 bits of data and one stop bit.
Code.
Write a code for:
After reset all LEDs must blink with 1.5Hz frequency and send to the UART your name and surname (please write to the report the formula and parameters for the blinking frequency you calculated and set in CubelDE).
If the first button is released - Send to the UART message "EFFECT 1" and LEDs should start blinking with the "EFFECT 1" sequence: 110,011,101,111,101,000 with 98Hz frequency.
If the second button is pressed - Send to the UART text "EFFECT 2" and LEDs should start blinking with the "EFFECT 2" sequence: 110,010,011 with 22Hz frequency.
If send the command "SB" to UART, LEDs should stop blinking and need to be OFF. UART should print out text "Stop Blinking".
If send the command "G1" to the microcontroller UART, LEDs should start blinking with the 3Hz frequency (please write to the repo the formula and parameters for the blinking frequency you calculated and set in CubelDE).
If sending the command "AN" to UART - ADC should read the voltage from analog input and send to UART voltage value. IF value than 1,5V- LEDs should be off if less ON.
 Connect 3 LED's (GPIO),2 Push buttons (EXTI), and voltage divider (R3=1k

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!