BlocklyProp reference Pulse in / out blocks
For Propeller Activity Board WX, FLiP and Other board types. Not available for Badge or Scribbler Robot board types.
The PIN menu on each of these blocks can be set to "other." When "other" is chosen, the dropdown menu disappears and it is replaced with an input. You can then use any block that provides a numeric value such as a number value, get variable, or constant value block:
The pulse-in block provides a value that represents a measurement of how long a pulse is in a low or high state in units of microseconds. The Propeller microcontroller begins measuring as soon as the PIN transitions into the state and stops and reports the measurement when it transitions out of the state.
The pulse-out block sends a pulse out on the PIN set by the drop-down menu. The value block sets the width of the pulse output in microseconds.
The count pulses block provides the number of pulses detected over a certain period of time.
- Choose the Propeller I/O pin to monitor for pulses in the dropdown; options will vary by board type.
- Set how long to monitor that pin for pulses by putting a number value, variable, or expression that resolves to a number in the duration (ms) field.