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
/* | |
Blink | |
Turns on an LED on for one second, then off for one second, repeatedly. | |
This example code is in the public domain. | |
*/ | |
// Pin 13 has an LED connected on most Arduino boards. | |
// give it a name: | |
int relay1 = 13; // pin 13 |
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
<html ng-app="dragTest"> | |
<head> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" type="text/javascript"></script> | |
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js" type="text/javascript"></script> | |
<script src="http://code.angularjs.org/1.2.1/angular.min.js" type="text/javascript"></script> | |
<script src="http://code.angularjs.org/1.2.1/angular-sanitize.min.js"></script> | |
</head> | |
<body class="container"> | |
<div ng-controller="dragCtrlr"> |
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
/* | |
http://www.baldengineer.com/blog/2012/07/30/arduino-multi-digit-integers/ | |
*/ | |
unsigned int controllerInputVal=0; // Max value is 65535 | |
char incomingByte; | |
char controllerInput; | |
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
import struct | |
import SocketServer | |
from base64 import b64encode | |
from hashlib import sha1 | |
from mimetools import Message | |
from StringIO import StringIO | |
class WebSocketsHandler(SocketServer.StreamRequestHandler): | |
magic = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11' |
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
import struct | |
import SocketServer | |
from base64 import b64encode | |
from hashlib import sha1 | |
from mimetools import Message | |
from StringIO import StringIO | |
class WebSocketsHandler(SocketServer.StreamRequestHandler): | |
magic = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11' |
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
const int cloudModulePin = 2; // switch input from cloud module JST connector <-----> Arduino pin 2 | |
const int motor1Pin = 6; // H-bridge pin 2 <-----> Arduino pin 6 | |
const int motor2Pin = 7; // H-bridge pin 7 <-----> Arduino pin 7 | |
// note - arduino and JST connector share common ground | |
void setup() { | |
// set the switch as an input: | |
pinMode(cloudModulePin, INPUT); |
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
<!-- Copy this into your HTML file right aboove </body> --> | |
<!-- load jquery from cdn --> | |
<script type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js'></script> | |
<!-- STEP 1 - load mespeak from your webserver UPDATE PATH. Download here http://www.masswerk.at/mespeak --> | |
<script type='text/javascript' src='http://www.productiondesign.nl/yt_player_mespeak/js/mespeak/mespeak.js'></script> | |
<script type='text/javascript'> | |
// STEP 2 - config mespeak you will need two files |
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
/* | |
Pins, 13-11 connected to relays | |
serial input 1-3 to toggle relay on for 2 seconds | |
from Tom Igoe's RGB Serial example | |
This example code is in the public domain. | |
*/ | |
// pins for the LEDs: | |
const int pinA = 13; |
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
<div id="dynamicContent"></div> | |
<hr> | |
<button id="mrButton">Click me</button> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> | |
<script> | |
jQuery('#mrButton').click(function(e){ |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="description" content=""> | |
<meta name="author" content=""> | |
<link rel="shortcut icon" href="../../docs-assets/ico/favicon.png"> |