This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <FastLED.h> | |
// LED stuff | |
#define DATA_PIN 3 | |
#define NUM_LEDS 30 // will be 500 | |
#define MAX_POWER_MILLIAMPS 6000 | |
#define LED_TYPE WS2812B | |
#define COLOR_ORDER GRB | |
CRGB leds[NUM_LEDS]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <CapacitiveSensor.h> | |
/* | |
CapitiveSense Library Demo Sketch | |
Paul Badger 2008 | |
modified by Eric Forman 2017 | |
Install library from Arduino IDE: Go to Sketch / Include Library / Manage Libraries, then search for "capacitiveSensor" | |
and select library by Paul Badger, Paul Stoffregen, select latest version, click Install. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* reads a sensor on pin A0 and sends raw and smoothed values via serial, comma-separated. | |
Sends COMMA-SEPARATED values in the range 0 to 1023, followed by a newline, or newline and carriage return. | |
Use with "graphMultiple" processing code | |
Created April 2011 by Eric Forman | |
Updated March 21 2013 by Eric Forman | |
*/ | |
const int PinA = A0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Sensor smoothing | |
by Eric Forman [www.ericforman.com] | |
Original version 2008, updated May 2012 | |
Smooths sensor readings by adding only a fraction of new values. | |
The more the new value is divided, the smaller the change, thus a smoother result | |
As with any smoothing function, the more you smooth, the slower the response time | |
*/ | |
int sensorPin = 0; // sensor input pin |