Reference for Wiring 1.0 (ALPHA) 0017+. If you have a previous version, use the reference included with your software.
If you see any errors or have any comments, let us know.
Name
pulseStop()
Examples
void setup() {
pinMode(0, INPUT); // sets digital pin 0 as input to connect a switch
pulseOut(4, 20); // generates a pulse of 20Hz on PWM output pin 4
}
void loop() {
if(digitalRead(0) == HIGH) { // if the switch is pressed stop the pulse
pulseStop(4);
}
}
Description
The pulseStop() method stops the pulse generation in the specified PWM output pin. If a number of pulses has been specified it stops the pulses even if there is remaining pulses to generate.
pulseStop() 메소드는
지정한 PWM 출력핀의 펄스
발생을 정지 합니다.
발생할 펄스가 남아
있더라도 펄스 발생을
종료합니다.
Syntax
pulseStop(pin)
Parameters
pin
int: the PWM output pin number to stop generating pulses
펄스가 발생하는 PWM
출력 핀 번호