This project focuses on Timer/Counter programming, PWM generation, and ADC integration on the Arduino Nano (ATmega328P) without using Arduino libraries. All functionality is implemented at register level.
The project demonstrates how to:
- Read analog input values using the ADC.
- Generate a PWM signal using timers to control a servo motor.
- Use voltage thresholds to trigger LED behaviors (blinking or dimming).
- Apply embedded C programming concepts directly on microcontroller registers.
- Potentiometer input (0–5 V) → controls servo position (0°–180°).
- PWM output drives a servo motor.
- LED behavior:
- Below 2.5 V → LED dims proportionally.
- Above 2.5 V → LED blinks with 1s interval.
- No Arduino libraries used → all code works at hardware register level.
- Microcontroller: Arduino Nano (ATmega328P)
- Components:
- Potentiometer (analog input)
- Servo motor (PWM output)
- LED + Resistor
📷 https://github.com/LeoTomy/Timer-Programming-with-Arduino-Nano--/blob/main/setup.png
- Flash the C code to your Arduino Nano using AVR-GCC or Arduino IDE (register-level).
- Connect the hardware as described.
- Adjust the potentiometer and observe servo + LED behavior.
This project is licensed under the MIT License – free to use, modify, and distribute.