int wert;
int j = 0;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
for (int i = 1; i <=1024; i*=2) {
Serial.print("i: \t");
Serial.print(i);
j = i-1;
wert = map(j, 0,1023,0,255);
Serial.print("\t, j: \t");
Serial.print(j);
Serial.print("\t, wert: \t");
Serial.println(wert);
delay(100);
}
for (int i = 0; i <=1023; i++) {
wert = map(i, 0,1023,0,255);
Serial.print("i: \t");
Serial.print(i);
Serial.print("\t, wert: \t");
Serial.println(wert);
delay(20);
}
for (int i = 550; i <=1023; i++) {
wert = map(i, 550, 1023, 0, 255);
Serial.print("i: \t");
Serial.print(i);
Serial.print("\t, wert: \t");
Serial.println(wert);
delay(50);
}
}