Skip to content

Instantly share code, notes, and snippets.

@smak7
smak7 / Arduino code
Last active December 15, 2015 22:25
artisanal tech flip flop code
// Variables
int pulsePin = 3; // Pulse Sensor purple wire connected to analog pin 0
int blinkPin = 13; // pin to blink led at each beat
int fadePin = 5; // pin to do fancy classy fading blink at each beat
int fadeRate = 0; // used to fade LED on with PWM on fadePin
// Volatile Variables, used in the interrupt service routine!
volatile int BPM; // int that holds raw Analog in 0. updated every 2mS
volatile int Signal; // holds the incoming raw data