agentsclimarketplace

Atmega32a cumulative led bar graph control

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt4_8_GLM4.7/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.From its SKILL.md

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

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

2.1 KB, 410 tokens by cl100k_base, as published. Nobody here has run it

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

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.