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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
# All Vagrant configuration is done here. The most common configuration | |
# options are documented and commented below. For a complete reference, | |
# please see the online documentation at vagrantup.com. |
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
Jamess-iMac:Applications jamie$ ls -R | |
GitHub.app Vagrantfile Windows 7 Applications.app | |
./.vagrant/machines: | |
default | |
./.vagrant/machines/default: | |
virtualbox | |
./.vagrant/machines/default/virtualbox: |
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
/* | |
* Sunrise Alarm Clock and Night Light by James Bruce | |
* http://duinobits.com | |
* Initial setup requires you to reset the Arduino sometime in the evening. | |
* Set the hoursUntilSunrise relative to this time. | |
* eg, if you reset at 10pm, and want the sunrise to start at 6:30am, | |
* the value should be 8.5 - this will then be automatically changed to minutes for internal clock to function | |
* | |
*/ |
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
/* | |
RESTduino | |
A REST-style interface to the Arduino via the | |
Wiznet Ethernet shield. | |
Based on David A. Mellis's "Web Server" ethernet | |
shield example sketch. | |
Circuit: |
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
// Slightly modified Adalight protocol implementation that uses FastLED | |
// library (http://fastled.io) for driving WS2811/WS2812 led stripe | |
// Was tested only with Prismatik software from Lightpack project | |
#include "FastLED.h" | |
#define NUM_LEDS 114 // Max LED count | |
#define LED_PIN 6 // arduino output pin | |
#define GROUND_PIN 10 | |
#define BRIGHTNESS 255 // maximum brightness |
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
/* | |
Qyuick and dirty IR signal over i2c rebroadcast for | |
Lighting Cloud Mood Lamp By James Bruce | |
View the full tutorial and build guide at http://www.makeuseof.com/ | |
Used to get around the limitations of having two libraries that both require exact timings to work right! | |
*/ | |
#include <Wire.h> | |
#include <IRremote.h> |
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
/* | |
Lighting Cloud Mood Lamp By James Bruce | |
View the full tutorial and build guide at http://www.makeuseof.com/ | |
Sound sampling code originally by Adafruit Industries. Distributed under the BSD license. | |
This paragraph must be included in any redistribution. | |
*/ | |
#include <Wire.h> | |
#include "FastLED.h" |
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 <Adafruit_GFX.h> | |
#include <Adafruit_NeoMatrix.h> | |
#include <Adafruit_NeoPixel.h> | |
#define XSIZE 15 | |
#define YSIZE 14 | |
#define PIN 6 | |
Adafruit_NeoMatrix matrix = Adafruit_NeoMatrix(XSIZE, YSIZE, PIN, | |
NEO_MATRIX_BOTTOM + NEO_MATRIX_LEFT + |
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
set HUB to "192.168.1.216" --change for your bridge IP | |
set USER to "newdeveloper" | |
repeat | |
repeat with bulb from 1 to 2 -- Change if you have more bulbs or want to use a subset | |
set hue to (random number from 5000 to 12750) | |
set sat to (random number from 150 to 255) | |
set bri to (random number from 50 to 255) | |
set transitiontime to (random number from 1 to 3) -- Increase range for slower transitions | |
set query to "{\"sat\":" & sat & ",\"hue\":" & hue & ",\"bri\":" & bri & ",\"transitiontime\":" & transitiontime & "}" | |
set command to "curl --request PUT --data '" & query & "' http://" & HUB & "/api/" & USER & "/lights/" & bulb & "/state/ --connect-timeout 5" |
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
/* | |
Talking to Hue from an Arduino | |
By James Bruce (MakeUseOf.com) | |
Adapted from code by Gilson Oguime. https://github.com/oguime/Hue_W5100_HT6P20B/blob/master/Hue_W5100_HT6P20B.ino | |
*/ | |
#include <SPI.h> | |
#include <Ethernet.h> | |
// Hue constants |
OlderNewer