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
map((octet, index) => octet * Math.pow(256, 3 - index)) |
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
{ | |
"something":"cool" | |
} |
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
void setup() { | |
pinMode(9, OUTPUT); | |
pinMode(1, INPUT_PULLUP); | |
pinMode(2, INPUT_PULLUP); | |
pinMode(3, INPUT_PULLUP); | |
pinMode(4, INPUT_PULLUP); | |
pinMode(5, INPUT_PULLUP); | |
pinMode(6, INPUT_PULLUP); | |
pinMode(7, INPUT_PULLUP); | |
} |
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
/* | |
BlinkTone | |
Modified from Arduino Blink Example | |
Once you've changed the frequency for blinking an LED, drop a speaker in instead. | |
Modify the delay to hear different tones. Then, write a function to make it easier to call for different tones. | |
*/ | |
// the setup function runs once when you press reset or power the board |
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
/* | |
AnalogReadSerial + Power & Ground | |
Reads an analog input on pin A2, prints the result to the Serial Monitor. | |
Graphical representation is available using Serial Plotter (Tools > Serial Plotter menu). | |
Plug a potentiometer into A0, A2, and A4. | |
This example code is in the public domain. |
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
/* | |
AnalogReadSerial + Power & Ground | |
Reads an analog input on pin A2, prints the result to the Serial Monitor. | |
Graphical representation is available using Serial Plotter (Tools > Serial Plotter menu). | |
Plug a potentiometer into A0, A2, and A4. | |
This example code is in the public domain. | |
http://www.arduino.cc/en/Tutorial/AnalogReadSerial | |
*/ |
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 "Volume3.h" | |
#define speakerPin 9 | |
#include <CapacitiveSensor.h> | |
CapacitiveSensor cs_4_2 = CapacitiveSensor(4,2); // 10M resistor between pins 4 & 2, pin 2 is sensor pin, add a wire and or foil if desired | |
const int n = 20; | |
const int timeBetweenSamples = 1; |
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 | |
* Uses a high value resistor e.g. 10M between send pin and receive pin | |
* Resistor effects sensitivity, experiment with values, 50K - 50M. Larger resistor values yield larger sensor values. | |
* Receive pin is the sensor pin - try different amounts of foil/metal on this pin | |
*/ |
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> | |
CapacitiveSensor cs_4_2 = CapacitiveSensor(4,2); // 10M resistor between pins 4 & 2, pin 2 is sensor pin, add a wire and or foil if desired | |
const int n = 20; | |
const int timeBetweenSamples = 1; | |
int readIndex = 0; | |
int runningPresent[n]; |
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
#define XPIN 2 | |
#define YPIN 3 | |
#define X 0 | |
#define Y 1 | |
volatile short timeHigh[2] = {0, 0}; | |
volatile short timeLow[2] = {0, 0}; | |
volatile long lastFalling[2] = {0, 0}; | |
volatile long lastRising[2] = {0, 0}; |