Skip to content

Instantly share code, notes, and snippets.

@sixstringsg
Created January 20, 2023 21:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sixstringsg/d75ac5be989e3bebbe6f9bf25d2f72cb to your computer and use it in GitHub Desktop.
Save sixstringsg/d75ac5be989e3bebbe6f9bf25d2f72cb to your computer and use it in GitHub Desktop.
if (!e131.isEmpty()) {
e131_packet_t packet;
e131.pull(&packet); // Pull packet from ring buffer
if (htons(packet.universe) == UNIVERSE) {
for (int i = 0; i < NUM_PIXELS; i++) {
int j = i * 3 + 1;
pixels.setPixelColor(i, packet.property_values[j], packet.property_values[j+1], packet.property_values[j+2]);
}
pixels.show();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment