Skip to content

Instantly share code, notes, and snippets.

@focalintent
focalintent / GridMaps
Last active March 1, 2023 07:08
Showing off some pixel mapping and rotating
// base GridMap class. Allows from mapping from an X x Y grid of
// T values to an MX x MY grid of T values (where
// MX and MY are greater than X and Y respectively), using linear
// interpolation to fill in the gaps. Optionally allows for rotating
// around the center point. Subclasses should provide an implementation
// for the interpolate method, appropriate to the type of data being mapped
template<int X, int Y, int MX, int MY, class T> class AbstractGridMap {
int revcosval,revsinval;
uint8_t angle;
@focalintent
focalintent / pixel_node.ino
Created May 1, 2014 19:19
pixel_node ported to FastLED
/***************************************************************************
*
* Title : Arduino based Art-Net -> LED Pixel, Digital LED Strip gateway
* Version : v 0.2 beta
* Last updated : 17.12.2012
* Target : Arduino mega 2560, Arduino mega 1280, Arduino UNO *** Arduino IDE v0023 ***
* Pixel number : Arduino mega 340 pixels (2 universes), Arduino UNO 170 pixels (1 universe)
* Driver support : TM1803, TM1804, TM1809, TM1812, WS2811
* Author : Toni Merino - merino.toni at gmail.com
* Web : www.deskontrol.net/blog