Skip to content

Instantly share code, notes, and snippets.

View zunin's full-sized avatar

Nikolai Øllegaard zunin

  • NRGi
  • Aarhus, Denmark
View GitHub Profile

Keybase proof

I hereby claim:

  • I am zunin on github.
  • I am nikolaioelle (https://keybase.io/nikolaioelle) on keybase.
  • I have a public key ASB-DbrN9MuhbPm-c74XVNyB_N7JbaOIoK_y-QjcGtL17wo

To claim this, I am signing this object:

@zunin
zunin / Pulse.cpp
Created January 16, 2016 19:19
Arduino class for preserving the state of a 'pulse' in an LED chain (for instance neopixel)
#include "Pulse.h"
Pulse::Pulse(int length, bool decreasing, int max, int min){
_length = length;
_decreasing = decreasing;
_alive = false;
_dying = false;
_max = max;
_min = min;
}
@zunin
zunin / lamp.ino
Created January 16, 2016 19:09
Arduino pulsating 'lamp'
#include <Adafruit_NeoPixel.h>
#define PIN 5
#define numberOfPixels 82 // indexed 0-89
Adafruit_NeoPixel table_strip = Adafruit_NeoPixel(numberOfPixels, PIN, NEO_GRB + NEO_KHZ800);
void setup() {
table_strip.begin();