Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<title>Geolocation</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<style>
html, body, #map-canvas
{
<!DOCTYPE html>
<html>
<head>
<script src="http://maps.googleapis.com/maps/api/js"></script>
<script>
var myCenter=new google.maps.LatLng(43.658907, -79.384924);
function initialize()
{
var mapProp =
import codeanticode.syphon.*;
SyphonServer server;
import ddf.minim.*;
AudioPlayer player;
Minim minim;//audio context
PImage YEL;
PImage BLUE;
PImage RED;
import processing.serial.*;
Serial myPort;
import codeanticode.syphon.*;
SyphonServer server;
import ddf.minim.*;
AudioPlayer player;
Minim minim;
int btY = 10;
int btR = 13;
int ledY = 7;
int ledR = 8;
int btYState = 0;
int btRState = 0;
int btYCounter = 0;
int btYCounter_old = 0;
int btRCounter = 0;
import codeanticode.syphon.*;
SyphonServer server;
PImage img;
float R;
float G;
float B;
long lastChange1;
//Based on openCV resourse code "gesture_baseFile2a_motionPixels", by: Daniel Shiffman
//Based on Processing resourse code "Water Simulation", by: Rodrigo Amaya
import processing.video.*;
Capture video; //variable for capture device
PImage prevFrame; //previous Frame of captured camera video
PImage refImg; //import a static image
int imgAlpha = 0; //define the initial alpha value of image
//<<=== refer to the example of servo > sweep ===>>
#include <Servo.h>
Servo myServo;
int lightReceiver = A0; //pin: photocell
int led = 6; //pin: LED
int lightDef = 240; //define the value of brightness