This encoder has three things all in one product:
- a rotary encoder
- a switch
- an RGB LED
The SparkFun page mentions
Gray Code but it is wrong; the datasheet they link to clearly shows
quadrature encoding (two pulse outputs on two pins, offset so you can tell not only that the encoder is being turned, but also in which direction).
Teensyduino ships with the
Encoder library, which handles this type of encoder. You will need two pins. On Teensy 3.x all pins are interrupt enabled.
https://www.pjrc.com/teensy/td_libs_Encoder.html
For the switch, use the
Bounce library. You will need one pin for reading the switch.
https://www.pjrc.com/teensy/td_libs_Bounce.html
The relevant information for LEDs in the datasheet is right at the end. LEDs have two pins, the anode (+) and the cathode (-); this RGB LED is wired with all three anodes connected together (common anode). For driving RGB LEDs, there is a tutorial (but for Teensy 2, so assuming 5V; could use an update for Teensy 3.x)
https://www.pjrc.com/teensy/tutorial2.html
I will let someone who has experience with RGB LEDs on the 3.3V Teensy LC/3.x comment on how best to connect and drive them.
There was a thread about using the MCP23S17 expander to drive these SparkFun RGB encoders (but it was with Teensy 3.5, so 5V tolerant)
https://forum.pjrc.com/threads/42514-SPI-MCP23S17-and-RGB-Rotary-Encorders?highlight=RGB+LED+3.3V
Well, hope that helps a bit.