Overview
The Pulse Duration function in Microsoft MakeCode allows users to retrieve the duration of the last detected pulse on a specified pin, measured in microseconds. This function is particularly useful in projects involving sensors or other hardware that rely on pulse signals.
Key Features:
- Real-time Measurement: Capture the duration of pulses as they occur, enabling responsive interactions in your projects.
- Integration with Events: Use the
pulseDurationfunction within theonPulsedevent to trigger actions based on pulse length. - Hardware Requirement: Note that this function requires real hardware to operate and is not supported in the simulator.
Use Cases:
- Sensor Applications: Measure the duration of signals from sensors to determine distances or timings.
- Interactive Projects: Create interactive experiences that respond to user inputs based on pulse lengths, such as in games or educational tools.

