Physik: Unterschied zwischen den Versionen
Aus RMG-Wiki
Zeile 14: | Zeile 14: | ||
U=Spannung (Wird in V angegeben) | U=Spannung (Wird in V angegeben) | ||
− | |||
− | |||
<pre> | <pre> | ||
void setup() | void setup() | ||
Zeile 30: | Zeile 28: | ||
tone(2,330,800);delay(810); | tone(2,330,800);delay(810); | ||
tone(2,349,800);delay(810); | tone(2,349,800);delay(810); | ||
− | tone(2,392,1600);delay( | + | tone(2,392,1600);delay(1620); |
− | tone(2,392,1600);delay( | + | tone(2,392,1600);delay(1620); |
tone(2,440,800);delay(810); | tone(2,440,800);delay(810); | ||
tone(2,440,800);delay(810); | tone(2,440,800);delay(810); | ||
tone(2,440,800);delay(810); | tone(2,440,800);delay(810); | ||
tone(2,440,800);delay(810); | tone(2,440,800);delay(810); | ||
− | tone(2,392,3200);delay( | + | tone(2,392,3200);delay(3240); |
tone(2,440,800);delay(810); | tone(2,440,800);delay(810); | ||
tone(2,440,800);delay(810); | tone(2,440,800);delay(810); | ||
tone(2,440,800);delay(810); | tone(2,440,800);delay(810); | ||
tone(2,440,800);delay(810); | tone(2,440,800);delay(810); | ||
− | tone(2,392,3200);delay( | + | tone(2,392,3200);delay(3240); |
tone(2,349,800);delay(810); | tone(2,349,800);delay(810); | ||
tone(2,349,800);delay(810); | tone(2,349,800);delay(810); | ||
tone(2,349,800);delay(810); | tone(2,349,800);delay(810); | ||
tone(2,349,800);delay(810); | tone(2,349,800);delay(810); | ||
− | tone(2,330,1600);delay( | + | tone(2,330,1600);delay(1620); |
− | tone(2,330,1600);delay( | + | tone(2,330,1600);delay(1620); |
tone(2,294,800);delay(810); | tone(2,294,800);delay(810); | ||
tone(2,294,800);delay(810); | tone(2,294,800);delay(810); | ||
tone(2,294,800);delay(810); | tone(2,294,800);delay(810); | ||
tone(2,294,800);delay(810); | tone(2,294,800);delay(810); | ||
− | tone(2,262,3200);delay( | + | tone(2,262,3200);delay(3240); |
} | } | ||
else | else |
Version vom 2. Februar 2015, 16:53 Uhr
I=U:R
U=RxI
R=U:I
I=Stomstärke (Wird in A angegeben)
R=Widerstand (Wird in Ω angegeben)
U=Spannung (Wird in V angegeben)
void setup() { pinMode(13,OUTPUT); pinMode(7,INPUT); } void loop() { if(digitalRead(7) == HIGH) { tone(2,262,800);delay(810); tone(2,294,800);delay(810); tone(2,330,800);delay(810); tone(2,349,800);delay(810); tone(2,392,1600);delay(1620); tone(2,392,1600);delay(1620); tone(2,440,800);delay(810); tone(2,440,800);delay(810); tone(2,440,800);delay(810); tone(2,440,800);delay(810); tone(2,392,3200);delay(3240); tone(2,440,800);delay(810); tone(2,440,800);delay(810); tone(2,440,800);delay(810); tone(2,440,800);delay(810); tone(2,392,3200);delay(3240); tone(2,349,800);delay(810); tone(2,349,800);delay(810); tone(2,349,800);delay(810); tone(2,349,800);delay(810); tone(2,330,1600);delay(1620); tone(2,330,1600);delay(1620); tone(2,294,800);delay(810); tone(2,294,800);delay(810); tone(2,294,800);delay(810); tone(2,294,800);delay(810); tone(2,262,3200);delay(3240); } else { tone(2,344,1000);delay(1100); } } </div>