Master Device
Overview of basic functions for I2C communication with Feelix
#define SLAVE_0_ADDRESS 0x70
#define SLAVE_1_ADDRESS 0x71
#define SLAVE_2_ADDRESS 0x72uint8_t slaves[] = { SLAVE_0_ADDRESS, SLAVE_1_ADDRESS };
/* initialize master device */
MasterDevice I2C_Master(slaves);Initialization
/* initialize as Master device */
I2C_Master.init(
ESP32_SDA, //I2C Data (SDA)
ESP32_SCL, //I2C Clock (SCL)
CLOCK_SPEED::SLOW_MODE, //Clock frequency
// CLOCK_SPEED::SLOW_MODE = 100000
// CLOCK_SPEED::FAST_MODE = 400000
DEBUG, //(optional)
// bool debug (set to false before production)
callbackArr, //(optional)
// array with callback functions (functionPtr)
callbackLength); //(optional) size of arrayReceiving motor parameters
Sending variables to slave
Last updated
Was this helpful?
