-
ESP8266
- We used this one very cheap from china (order some right now but 3-4weeks delivery)
- You should order this one to get it fast (adafruit <3)
-
LEDS
-
We used this one
This file contains hidden or 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 <ESP8266WiFi.h> | |
#include <WiFiClient.h> | |
#include <ESP8266WebServer.h> | |
#include <ESP8266mDNS.h> | |
const char* ssid = "bla"; | |
const char* password = "blablabla"; | |
ESP8266WebServer server(80); |
This file contains hidden or 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
// Full orientation sensing using NXP's advanced sensor fusion algorithm. | |
// | |
// You *must* perform a magnetic calibration before this code will work. | |
// | |
// To view this data, use the Arduino Serial Monitor to watch the | |
// scrolling angles, or run the OrientationVisualiser example in Processing. | |
#include <NXPMotionSense.h> | |
#include <Wire.h> | |
#include <EEPROM.h> |
This file contains hidden or 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
// https://forums.meteor.com/t/meteor-and-the-internet-of-things-iot-whats-best-to-use-collection-meteor-streams-streamy/792/57 | |
// https://github.com/wojtkowiak/meteor-custom-protocol | |
// Other options | |
// http://stackoverflow.com/questions/23148992/how-to-emit-data-only-to-one-client-in-meteor-streams | |
// http://stackoverflow.com/questions/26226583/meteor-proper-use-of-meteor-wrapasync-on-server | |
// http://stackoverflow.com/questions/29486983/save-serialport-list-with-meteor | |
import { Meteor } from 'meteor/meteor'; |
This file contains hidden or 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 myowareInPin A0 | |
#define triggerPin D1 | |
int myowareValue = 0; | |
int treshold = 650; | |
void setup() { |
This file contains hidden or 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
pragma solidity ^0.4.11; | |
/// @dev `Owned` is a base level contract that assigns an `owner` that can be | |
/// later changed | |
contract Owned { | |
/// @dev `owner` is the only address that can call a function with this | |
/// modifier | |
modifier onlyOwner() { |
This file contains hidden or 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
pragma solidity ^0.4.11; | |
/* taking ideas from FirstBlood token */ | |
contract SafeMath { | |
function safeAdd(uint256 x, uint256 y) internal returns(uint256) { | |
uint256 z = x + y; | |
assert((z >= x) && (z >= y)); | |
return z; | |
} |
This file contains hidden or 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
DEFAULT_GAS = 200000 | |
var iteration = 0 | |
var gasElemt = $('*[ng-change="gasLimitChanged=true"]'); | |
var intervalPTR; | |
function doAmazingStuff() { | |
if (iteration == 1000) { | |
console.log("Stop") | |
clearInterval(intervalPTR); |
This file contains hidden or 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
/* | |
After purchasing a humble book bundle, go to your download page for that bundle. | |
Open a console window for the page and paste in the below javascript | |
*/ | |
$('a').each(function(i){ | |
if ($.trim($(this).text()) == 'EPUB') { | |
$('body').append('<iframe id="dl_iframe_'+i+'" style="display:none;">'); | |
document.getElementById('dl_iframe_'+i).src = $(this).data('web'); | |
} | |
}); |