pub async fn detect_hand_from_matrix<E, O: OutputPin<Error = E>, I: InputPin<Error = E>>(
output: O,
input: I,
input_delay: Option<Duration>,
high_hand: Option<Hand>,
) -> Result<Hand, E>
Expand description
Utility function that takes an output pin and an input pin and determines the move based on the result of the input pin when the output pin is high.
output
: Output pininput
: Input pininput_delay
: Time from output pin high to read (default: 10ms)high_hand
: Which move is judged when the input pin is high? (default: Left)