Skip to content

Instantly share code, notes, and snippets.

@helloCaller
helloCaller / LukePhysComp_Blinky.ino
Last active January 20, 2016 03:11
Arduino code for blinking LED. Physical Computing 2002-001
/*
Blinky
Make an LED blink
Adapted by Luke Garwood after example 4-1 from Getting Started With Arduino by Massimo Banzi and Michael Shiloh
*/
int LEDPIN = 13; //set up variable LEDPIN as the pin to which the LED connects (13)
void setup() { //function that only runs once initially
@helloCaller
helloCaller / LukePhysComp_Buttony.ino
Last active January 20, 2016 03:08
Arduino code for button click on and off of LED. Physical Computing 2002-001
/*
Buttony
Click an LED on and off with a button.
Adapted by Luke Garwood after example 4-5 from Getting Started With Arduino by Massimo Banzi and Michael Shiloh
*/
int LEDPIN = 13; //set up variable LEDPIN as the pin to which the LED connects
@helloCaller
helloCaller / LukePhysComp_ThreeButtony.ino
Created January 20, 2016 03:06
Arduino, button and three LED sketch.
/*
ThreeButtony
With a push of a button three LEDs (green, red, and yellow) light up in quick succession. Each time the button gets pressed time slows down, and the
length of time each light stays on increases.
Created by Luke Garwood after example 4-5 from Getting Started With Arduino by Massimo Banzi and Michael Shiloh
*/
@helloCaller
helloCaller / LukePhysComp_brightChange3.ino
Created January 27, 2016 16:49
Arduino, serial monitor sketch
/*
Brighness Changer Part 3
Get serial input from a light sensor
Adapted by Luke Garwood after example 5-5 from Getting Started With Arduino by Massimo Banzi and Michael Shiloh
*/
const int SENSOR = 1; // setting sensor pin to A1
int LightSensorValue; // variable to store the value of light sensor
@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
@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 / 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_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 / 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 / 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="">