Skip to content

Instantly share code, notes, and snippets.

View samguyer's full-sized avatar

Sam Guyer samguyer

  • Boston area
View GitHub Profile
@samguyer
samguyer / SoundOMeter.ino
Created July 7, 2018 01:38
Arduino sketch for a simple volume meter
#include <FastLED.h>
// Sound O Meter
// Visual display of ambient noise volume
// Copyright (c) 2017 Sam Guyer
#define MAX_BRIGHTNESS 100
#define NOISE 8
// -- Arduino pins
@samguyer
samguyer / fastledtask.cpp
Created May 31, 2018 02:40
Code to run FastLED on separate core
// ===== FastLED Show task ========================================
// -- The core to run FastLED.show()
#define FASTLED_SHOW_CORE 0
bool gShowOnOtherCore = true;
// -- Task handles for use in the notifications
static TaskHandle_t FastLEDshowTaskHandle = 0;
static TaskHandle_t userTaskHandle = 0;
@samguyer
samguyer / multiflame.cpp
Created March 19, 2018 01:43
Multipe flame Fire2012
#include <FastLED.h>
#define FLAME_1_PIN 3
#define FLAME_1_SIZE 60
#define FLAME_2_PIN 4
#define FLAME_2_SIZE 24
#define FLAME_3_PIN 5
#define FLAME_3_SIZE 51
@samguyer
samguyer / BurningShelf.cpp
Created March 1, 2018 02:05
Code for a "fire" (three LED strip flames) triggered by a PIR sensor.
#include <FastLED.h>
#include <adel.h>
#define PIRPIN 6
#define FLAME_1_PIN 3
#define FLAME_1_SIZE 60
#define FLAME_2_PIN 4
#define FLAME_2_SIZE 24