12 #include <pico/stdlib.h>
14 #ifndef MBOT_ENCODER_H
15 #define MBOT_ENCODER_H
int mbot_encoder_cleanup()
Stops the encoder counters. Recommended to be called at the end of the program.
Definition: encoder.c:51
int mbot_encoder_read_count(uint8_t ch)
Reads the current count of an encoder channel. The count is a signed 32-bit integer that wraps around...
Definition: encoder.c:75
int mbot_encoder_write(uint8_t ch, int pos)
Sets the current position of an encoder channel. Typically used to reset a counter to 0,...
Definition: encoder.c:91
int mbot_encoder_init()
Initializes the encoder counters for channels 1-3. This also resets the encoder position to 0.
Definition: encoder.c:23
int mbot_encoder_read_delta(uint8_t ch)
Reads the current delta of an encoder channel.
Definition: encoder.c:61