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
#include <Encoder.h> | |
#include <Keyboard.h> | |
#include <Mouse.h> | |
//encoder pins are on 6 and 7 | |
Encoder myEnc(6, 7); | |
//previous encoder position | |
long prevPosition = -999; | |
//encoder momentary button |
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
//pins used | |
int sensorPin = 3; | |
int LEDpin = 4; | |
//light brightness | |
int brightness = 0; | |
int fadeRate = 3; | |
void setup() { | |
Serial.begin(9600); | |
pinMode(LEDpin, OUTPUT); |
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; | |
public class RandomCharController : MonoBehaviour { | |
private Animator myAnimator; | |
// Use this for initialization | |
void Start () { |
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
class Imgcloud { | |
constructor(img, r, theta, theta_vel) { | |
//pass to class | |
this.img = img; | |
this.r = r; | |
this.theta = theta; | |
this.theta_vel = theta_vel; | |
//other variables | |
this.x = 0; | |
this.y = 0; |
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
function updateNoun() { | |
//do not allow user to input white space or empty string into the word array | |
if (trim(nounInput.value()) != "") { | |
//push input to word array | |
nounArray.push(nounInput.value()); | |
//display submitted words below input field | |
nounPara.push(createP(nounInput.value())); | |
for (let i = 0; i < nounPara.length; i++) { | |
nounPara[i].position(nounInpX, inpY + 20 * (i - 1)); | |
} |
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
//webcam | |
let video; | |
let vidWidth = 600; | |
let vidHeight = 450; | |
//clm trackr | |
let facepos; | |
let ctracker; | |
function setup() { | |
//get webcam |
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
//input fields | |
let inpH = 550; | |
//name | |
let nameInput; | |
let newName = "Who is this?"; | |
//nouns | |
let nounInput; | |
let nounArray = []; | |
let nounPara = []; | |
//adjectives |
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
let canvas; | |
let video; | |
let factor = 10; | |
let thresholdSlider; | |
//pentatnoic scale freq in hz starting on middle C | |
//https://pages.mtu.edu/~suits/notefreqs.html | |
//C, D, E, G, A, C | |
let pentatonic = [261.63, 293.66, 329.63, 392, 440, 523.25]; | |
let musicBarSlider; | |
let sounds = []; |
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
//keep track of gifs | |
let currentGif; //the file path | |
let image; //the actual image | |
//API info | |
let APIkey = "3GGsEajJUSgykXGpw4EeN6QYY5w5Ve7G"; | |
let numGif = 25; | |
let queryLeft; | |
let queryRight; | |
let giphyLeftData; | |
let giphyMiddleData; |
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
<body> | |
<script src="sketch.js"></script> | |
<h1>click 4 gif</h1> | |
<div id="gif"></div> | |
<div id="slider"> | |
<input value="cat" style="right: 50%; margin-right: 180px;" class="keep" id="leftInput" /> | |
<input value="dog" style="left: 50%; margin-left: 180px;" class="keep" id="rightInput" /> |