#include <Arduino.h>
#include <Arduino.h>
/*Pamela Venta A01199290
* Homework 4 - Potentiometer reading using STM32 blue pill
*
* NOTE:The real firmware was written in STM32CubeIDE (HAL)
* and is loaded into Wokwi as an .elf file.
*
* Wiring:
* Potentiometer: VCC -> 3.3V, GND -> GND, SIG -> PA7 (ADC1_IN7)
* LED: PA0 (TIM2_CH1, PWM) -> LED -> resistor -> GND
*
* How it works:
* ADC1 reads the potentiometer (12-bit, 0-4095). The value is shifted left
* by 4 bits to scale it to 16 bits and written to TIM2->CCR1 (period 65535),
* so the PWM duty cycle follows the potentiometer position.
*
void setup() {}
void loop() {}