QPIDfirmware  v0.1
Object oriented firmware for autonomous motor drivers with encoder based PID controller and flexible interface
Messages for class QPID_Encoder_ESP32
Collaboration diagram for Messages for class QPID_Encoder_ESP32:

Functions

void QPID_Encoder_ESP32::init (double t, uint8_t a, uint8_t b, encType type)
 attach ESP32Encoder to pins and clear position to 0 More...
 

Detailed Description

####

A list of message commands understood by ESP32 hardware encoders.

A list of message commands understood by ESP32 hardware encoders. ###

Function Documentation

◆ init()

void QPID_Encoder_ESP32::init ( double  t,
uint8_t  a,
uint8_t  b,
encType  type 
)

attach ESP32Encoder to pins and clear position to 0

Init message. Takes five paramters:

  • t (double) ticks per revolution
  • m (int8_t) count mode (see QPID_Encoder::encoderCountMode)
  • a (int8_t) encoder pin 1
  • b (int8_t) encoder pin 2
  • type (int8_t) 'full' quad, 'half' quad or 'single' pulse (cf. encType from ESP32Encoder.h). init(int8_t(m[messageIdxParam + 0]), bool(m[messageIdxParam + 1]), bool(m[messageIdxParam + 2]));
Parameters
tticks per revolution
aencoder pin 1
bencoder pin 2
type'full' quad, 'half' quad or 'single' pulse (cf. encType from ESP32Encoder.h). Note that ESP32Encoder's 'full' and 'half' are a bit misleading, 'full' will generate a tick for each flank, 'half' fof two subsequent flanks, so that 'full' will generate twice as much ticks as 'half' mode.