-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
Hi!
Can you help? I don't fully understand how to assign tasks by ID for multiple encoders.
If I use multiple encoders, how do I request information for a particular encoder? How can I associate behavior with an ID. For example: If the encoder ID is X, do you do it, and if the encoder ID is Y, do you do it?
void encoder_rotated(i2cEncoderLibV2* obj) {
if (obj->readStatus(i2cEncoderLibV2::RINC))
Serial.print("Increment ");
else
Serial.print("Decrement ");
Serial.print(obj->id);
Serial.print(": ");
Serial.println(obj->readCounterInt());
"if the ID = 0" writeRGBCode(0x0000FF);
"if the ID = 1" writeRGBCode(0x00FF00);
}
Thanks in advance.
Metadata
Metadata
Assignees
Labels
No labels