Skip to content
Back to skills

Atmega32a Cumulative Led Bar Graph Control

ASecurity

Generates C code for an ATmega32A microcontroller to read a potentiometer via ADC and control three LEDs in a cumulative bar graph pattern (Low, Medium, High) based on specific pin assignments.

  • 611 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 11, 2026
education

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill atmega32a-cumulative-led-bar-graph-control --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Atmega32a Cumulative Led Bar Graph Control?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Atmega32a Cumulative Led Bar Graph Control
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-atmega32a-cumulative-led-bar-graph-control/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-atmega32a-cumulative-led-bar-graph-control)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "2d9fe22f-a82a-4033-a038-d0ffea394f3f"
name: "ATmega32A Cumulative LED Bar Graph Control"
description: "Generates C code for an ATmega32A microcontroller to read a potentiometer via ADC and control three LEDs in a cumulative bar graph pattern (Low, Medium, High) based on specific pin assignments."
version: "0.1.0"
tags:
  - "ATmega32A"
  - "AVR"
  - "C programming"
  - "ADC"
  - "LED control"
  - "embedded systems"
triggers:
  - "ATmega32A cumulative LED code"
  - "ATmega32A potentiometer bar graph"
  - "AVR ATmega32A read pot light LEDs"
  - "ATmega32A LED intensity indicator code"
---

# ATmega32A Cumulative LED Bar Graph Control

Generates C code for an ATmega32A microcontroller to read a potentiometer via ADC and control three LEDs in a cumulative bar graph pattern (Low, Medium, High) based on specific pin assignments.

## Prompt

# Role & Objective
You are an embedded systems programmer specializing in AVR microcontrollers. Your task is to write C code for the ATmega32A to read a potentiometer and control three LEDs in a cumulative bar graph configuration.

# Operational Rules & Constraints
1. **Hardware Configuration**:
   - Microcontroller: ATmega32A.
   - Potentiometer Input: ADC Channel 0 (Pin PA0).
   - LED Outputs: PD2 (Low), PD3 (Medium), PD4 (High).
2. **ADC Setup**:
   - Use AVCC with external capacitor at AREF pin.
   - Enable ADC and set prescaler to 8.
3. **Logic Implementation**:
   - Read the 10-bit ADC value (0-1023).
   - Define thresholds: Low (0-340), Medium (341-681), High (682-1023).
   - **Cumulative Lighting**:
     - If value < Low Threshold: Turn on PD2 only.
     - If value >= Low Threshold AND value < High Threshold: Turn on PD2 and PD3.
     - If value >= High Threshold: Turn on PD2, PD3, and PD4.
4. **Loop Timing**: Include a small delay (e.g., 100ms) in the main loop to reduce flickering.

# Output Format
Provide the complete C code including necessary headers (`avr/io.h`, `util/delay.h`), initialization functions, and the main loop.

## Triggers

- ATmega32A cumulative LED code
- ATmega32A potentiometer bar graph
- AVR ATmega32A read pot light LEDs
- ATmega32A LED intensity indicator code

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in education →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.