Skip to content

Instantly share code, notes, and snippets.

@helloCaller
helloCaller / CompassBehaviour.cs
Created October 29, 2020 18:54
A Unity compass script to point in app objects towards a real world location
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.
@helloCaller
helloCaller / buzzerV1.ino
Created January 16, 2017 00:23
mutilplesAtelier2GentleReminder
/*
* 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
*
*/
@helloCaller
helloCaller / physcomProject3earlyStage.html
Created March 30, 2016 05:27
early stage of html development
<!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="">
@helloCaller
helloCaller / physcomProject3.js
Created March 30, 2016 05:20
javascript for reactive website
//---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">'];
@helloCaller
helloCaller / physcomProject3.html
Created March 30, 2016 05:18
html code for reactive website
<!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="">
@helloCaller
helloCaller / LukePhysComp_StolenCode.pde
Last active February 12, 2016 19:37
Processing sketch, adapted from another sketch
/*
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"
*/
@helloCaller
helloCaller / LukePhysComp_Rotate.pde
Created February 12, 2016 19:32
Processing sketch with rotating image on key press
/*
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
@helloCaller
helloCaller / MattLukeBmo.ino
Created February 3, 2016 06:36
project 1 box
/*
* 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
@helloCaller
helloCaller / LukePhysComp_BrightChanger.ino
Created January 27, 2016 16:54
Arduino, Dim LED with button
/*
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
@helloCaller
helloCaller / LukePhysComp_BrightChanger2.ino
Created January 27, 2016 16:52
Arduino, change brightness with photoresistor
/*
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