Advanced I/O

Advanced I/O

Methods


advanced_io_pulse_in(pin, value)


Returns the pulse on a pin based on the chosen value.

Check out the third party documentation for a more in depth explanation.

Parameters:
Name Type Description
pin

pin to read the pulse from

value

the type of pulse to read: HIGH or LOW

Code Equivalent:
pulseIn(pin, value)

advanced_io_pulse_in_long(pin, value)


An alternative to advanced_io_pulse_in, and works better for reading long pulses. Reads the pulse on the given pin, and returns the length in microseconds. Returns 0 if no complete pulse is received within the duration.

Check out the third party documentation for a more in depth explanation.

Parameters:
Name Type Description
pin

pin to read the pulse from

value

the type of pulse to read: HIGH or LOW

Code Equivalent:
pulseInLong(pin, value)

advanced_io_pulse_in_long_timeout(pin, value)


An alternative to advanced_io_pulse_in, and works better for reading long pulses. Reads the pulse on the given pin after the timeout duration, and returns the length in microseconds. Returns 0 if no complete pulse is received within the duration.

Check out the third party documentation for a more in depth explanation.

Parameters:
Name Type Description
pin

pin to read the pulse from

value

the type of pulse to read: HIGH or LOW

Code Equivalent:
pulseInLong(pin, value, timeout)

advanced_io_pulse_in_timeout(pin, value, timeout)


Returns the length of the pulse on a pin based on the chosen value, after the duration.

Check out the third party documentation for a more in depth explanation.

Parameters:
Name Type Description
pin

pin to read the pulse from

value

the type of pulse to read: HIGH or LOW

timeout

the number of milliseconds to wait for the pulse to start

Code Equivalent:
pulseIn(pin, value, timeout)

tone_pin_freq_duration(frequency, pin)


Plays the given frequency on the given pin. It will play indefinitely until the program stops.

Check out the third party documentation for a more in depth explanation.

Parameters:
Name Type Description
frequency

frequency to play

pin

pin to play the frequency on

Code Equivalent:
tone(pin, frequency, duration);