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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using TMPro; | |
using System; | |
using UnityEngine.SceneManagement; | |
public class CompassBehaviour : MonoBehaviour { | |
//script for having an object point towards an IRL point in space from within the app using phone location and orientation. | |
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
/* | |
* Every Button click increases the amount of delay by 30s | |
* before sound occurs. Alarm is initiated after a button press has been registered | |
* | |
* | |
* note: -not the best debouncing used for button presses | |
* -no delay() has been used in case other things need to happen at the same time | |
* | |
*/ |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<!-- Make sure the <html> tag is set to the .full CSS class. Change the background image in the full.css file. --> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta name="description" content=""> |
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
//---Global Variables----- | |
//Defines a new particle object | |
var particle = new Particle(); | |
//Counts the number of events received - Each ParticleTriggerCount represents 20 people | |
var ParticleTriggerCount = 0; | |
//Array containing all our images with html code | |
var imageArray =['<img id="sit1" class= "img-responsive" src="img/sit1.png">','<img id="sit2" class= "img-responsive" src="img/sit2.png">','<img id="lookout" class= "img-responsive" src="img/lookout.png">','<img id="7" class= "img-responsive" src="img/crouch.png">','<img id="sitclap" class= "img-responsive" src="img/sitclap.png">','<img id="openlegs" class= "img-responsive" src="img/openlegs.png">','<img id="sit3" class= "img-responsive" src="img/sit3.png">','<img id="arabesque" class= "img-responsive" src="img/arabesque.png">','<img id="6" class= "img-responsive" src="img/feetup.png">','<img id="9" class= "img-responsive" src="img/armscrossed.png">','<img id="11" class= "img-responsive" src="img/lounge.png">']; | |
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
<!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"> | |
<meta name="description" content=""> | |
<meta name="author" content=""> |
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
/* | |
Original sketch http://openprocessing.org/sketch/288694 | |
I've taken this sketch and changed it to add colour for | |
moving particles, changed particle behaviour to spark more, and moved their positions | |
to form a more 3 dimensional figure. | |
changed lines wrapped in "//--------changed" | |
*/ |
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
/* | |
I've been pursuing an interest in applying differnt forces with Processing, so here is a first stab at applying | |
velocity to an angle. | |
Hold down any key and watch as the image spins faster and faster, let the key go and watch the image wind down to a stop. | |
Created by Luke Garwood | |
with some adaptated code from The Nature of Code by Daniel Shiffman | |
http://natureofcode.com/book/chapter-3-oscillation/2 | |
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
/* | |
* BMO | |
* | |
* A BMO inspired robot asks for hugs! Through the use of a ping sensor, our robot raises arms (connected to servos), and flashes its LED eyes | |
* in accordance to the distance of the user. | |
* | |
* Created by Matt Crans and Luke Garwood with code adapted from | |
https://www.arduino.cc/en/Tutorial/Ping | |
https://www.arduino.cc/en/Tutorial/Sweep | |
https://learn.adafruit.com/adafruit-neopixel-uberguide/overview |
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
/* | |
Brighness Changer | |
Change Brightness of an LED | |
Adapted by Luke Garwood after example 5-2 from Getting Started With Arduino by Massimo Banzi and Michael Shiloh | |
*/ | |
int LEDPIN = 9; //set up variable LEDPIN as the pin to which the LED connects | |
int BUTTONPIN = 7; //set up variable BUTTONPIN as the pin to which the button connects |
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
/* | |
Brighness Changer Part 2 | |
Change Brightness of an LED with photoresistor | |
Adapted by Luke Garwood after example 5-4 from Getting Started With Arduino by Massimo Banzi and Michael Shiloh | |
*/ | |
int LEDPIN = 9; //Setting up pin 9 to control the LED | |
int LightSensorValue = 0; //Setting up variable to hold values coming from light sensor |
NewerOlder