/*
-----------------------------------------------------------------------------------------------
Name: Ostryz Filip
Klasse: 3AHET
Abgabedatum:
Kurzbeschreibung:
}
-----------------------------------------------------------------------------------------------
*/
#include "general.h"
int main()
{
initPortB();
initTimer0();
while(1)
{
}
return 1;
}
/*const int potPin = A0; // Potentiometer an A0
const int ledPins[] = {2, 3, 4, 5, 6, 7, 8, 9}; // LEDs an digitalen Pins
volatile int potValue = 0;
void setup() {
for (int i = 0; i < 8; i++) {
pinMode(ledPins[i], OUTPUT);
}
pinMode(potPin, INPUT);
attachInterrupt(digitalPinToInterrupt(2), updatePotValue, CHANGE);
}
void loop() {
int level = map(potValue, 0, 1023, 0, 8); // Wert von 0-1023 auf 0-8 skalieren
displayLevel(level);
delay(100);
}
void updatePotValue() {
potValue = analogRead(potPin);
}
void displayLevel(int level) {
for (int i = 0; i < 8; i++) {
digitalWrite(ledPins[i], i < level ? HIGH : LOW);
}
}
*/