https://github.com/FRC-Team-4143/swerveneopixel
This sketch controls Adafruit neopixel leds over i2c. I2c is echoed over serial for debugging.
Crio code (in c++) is something like:
Code:
m_i2c = DigitalModule::GetInstance(1)->GetI2C(0x04 << 1);
RobotMap::m_i2c->Write(0x0, 50);
The first
0x0 is the command. The
50 is a parameter to the command in the sketch.
The i2c address is
0x4, but you have to shift it left on the Crio to write. That is the tricky part.