Skip to content

Instantly share code, notes, and snippets.

View hhayley's full-sized avatar

Hayley Hwang hhayley

View GitHub Profile
@hhayley
hhayley / PIXIE_MKR1000.ino
Created May 7, 2017 02:39
PIXIE+MKR1000 without SoftwareSerial
/*
MKR1000 + PIXIE 3w leds
without sofrwareSerial
UNO -> 1(TX)
MKR1000 -> 14(TX)
*/
//#include "SoftwareSerial.h"
#include "Adafruit_Pixie.h"
char ssid[] = ""; // your network SSID (name)
char pass[] = "";
/*
Bokeh light Node Server
Original Code : https://github.com/arduino-libraries/ArduinoHttpClient/blob/master/examples/node_test_server/getPostPutDelete.js
by Hayeon Hwang
*/
var express = require('express'); // include express.js
var app = express(); // a local instance of it
var bodyParser = require('body-parser'); // include body-parser
var WebSocketServer = require('ws').Server // include Web Socket server
char ssid[] = "ssid"; // your network SSID (name)
char pass[] = "password"; // your network password
#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
*/
#include "Interval.h"
#include <Adafruit_NeoPixel.h>
const int knockSensor = A0;
int val = 0;
#define PIN 6
const int numPixels = 7;
@hhayley
hhayley / abushcandle.ino
Created February 8, 2017 14:40
A Brush Candle
#include "Interval.h"
/*
A Brush Candle - Hayley Hwang
for Lighting & Interactivity Class
- NeoPixel RGBW x 1
- Piezo Sensor x 1
- 1mOhm x 1
*/
#include <Adafruit_NeoPixel.h>
int led = 9;
int btn = 2;
int buttonState = 0;
int lastButtonState = 0;
void setup() {
pinMode(led, OUTPUT);
pinMode(btn, INPUT);
Serial.begin(9600);
const int btn_1 = 2; // the number of the pushbutton pin
const int btn_2 = 3;
const int btn_3 = 4;
const int btn_4 = 5;
const int btn_5 = 6;
const int btn_6 = 7;
const int btn_7 = 8;
const int btn_8 = 9;
const int btn_9 = 10;
@hhayley
hhayley / index.html
Created October 27, 2016 18:55
Today than yesteday
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.2/p5.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.2/addons/p5.dom.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.2/addons/p5.sound.min.js"></script>
<script src="moment.js"></script>
<link rel="stylesheet" type="text/css" href="style.css">