Skip to content

Instantly share code, notes, and snippets.

View hhayley's full-sized avatar

Hayley Hwang hhayley

View GitHub Profile
char ssid[] = "ssid"; // your network SSID (name)
char pass[] = "password"; // your network password
/*
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[] = ""; // your network SSID (name)
char pass[] = "";
@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"
@hhayley
hhayley / bokehServer.js
Created May 10, 2017 00:59
Bokeh light Node Server
/*
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
/*
Based on Example/09.USB/KeyboardAndMouseControl example code by Tom Igoe
modified by Hayeon Hwang
- MKR1000
- water level sensor -> A0
- push button -> D4
*/
// acceleroMMA7361.h - Library for retrieving data from the MMA7361 accelerometer.
// Copyright 2011-2012 Jef Neefs (neefs@gmail.com) and Jeroen Doggen (jeroendoggen@gmail.com)
// For more information: variable declaration, changelog,... see AcceleroMMA7361.h
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
#include <AcceleroMMA7361.h>
AcceleroMMA7361 accelero;
int x;
int y;
int z;
int accelState = 0;
int lastAccelState = 0;
/******************************************************************************
edited for 2x2 button pad (without RGB leds)
red-plus-buttons.ino
Byron Jacquot @ SparkFun Electronics
1/6/2015
Exercise 2 in a series of 3.
https://learn.sparkfun.com/tutorials/button-pad-hookup-guide/exercise-2-monochrome-plus-buttons
/*
keypad library
Example-Keypad-multikey
Editing for the Sparkfun 1x4 silicone button pad
*/
#include <Keypad.h>
const byte ROWS = 1; //four rows