This file contains hidden or 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" | |
#if defined(FASTLED_VERSION) && (FASTLED_VERSION < 3001000) | |
#warning "Requires FastLED 3.1 or later; check github for latest code." | |
#endif | |
#define NUM_LEDS 100 | |
#define LED_TYPE WS2811 | |
#define COLOR_ORDER GRB |
This file contains hidden or 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 <math.h> // math library for Arduino | |
const int U_D = 2; // U/D pin on AD5220 | |
const int clk = 5; // CLK pin on AD5220 | |
volatile int counter = 0; // volatile integers are basically global variables, so any function can use them | |
volatile int pot[2]; // using an array to compare old pot value to new pot value to see if it has changed | |
volatile int diff[2]; // using a separate variable so we don't accidentally modify our read values | |
volatile int vol = 0; // volatile integers are basically global variables, so any function can use them | |
void setup() | |
{ |
This file contains hidden or 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 <math.h> // math library for Arduino | |
const int U_D = 2; // U/D pin on AD5220 | |
const int clk = 5; // CLK pin on AD5220 | |
volatile int counter = 0; // volatile integers are basically global variables, so any function can use them | |
volatile int pot[2]; // using an array to compare old pot value to new pot value to see if it has changed | |
volatile int diff[2]; // using a separate variable so we don't accidentally modify our read values | |
volatile int vol = 0; // volatile integers are basically global variables, so any function can use them | |
void setup() | |
{ |
This file contains hidden or 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
// Pin Definitions | |
// Rows are connected to Digital | |
const int rowPin[] = { 6, 7, 8, 5 }; | |
// FSRs connected to Analog | |
const int fsrPin[] = { 2, 3, 4, 5 }; | |
// The 74HC595 uses a serial communication | |
// link which has three pins | |
const int clock = 12; |