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
/* Basic Digital Read and Rotary Phone Dial Reader | |
* ------------------ | |
* This code reads whether the phone is on the hook by treating that hook like a button that is either open or depressed | |
AND it reads out the number dialed on a rotary phone dial by counting the pulses made by the spinning dial wheel. | |
*/ | |
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 setup() { | |
createCanvas(800, 800); | |
for(var i=0;i<10;i++) { | |
if(i % 3 == 0) { | |
arrow(50, 50, 10, color(255, 0, 100)); | |
} | |
else { | |
arrow(50, 50, 10, color(150, 0, 255)); | |
} |
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
/* | |
Title: | |
Imagined, Designed, and Programmed by: | |
Date: | |
Description: | |
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 setup() { | |
} | |
function draw() { | |
drawMouseCoordinates(); | |
} | |
function drawMouseCoordinates() { | |
push(); |
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
/*The Modulus operator! Remember in math when you didn't know how to use decimals, and you used to divide things | |
like 5%4= 1, remainder 1? Modulus is that, the remainder. | |
*/ | |
var a = 5 % 4; // Sets 'a' to 1 | |
var b = 125 % 100; // Sets 'b' to 25 | |
var c = 285.5 % 140.0; // Sets 'c' to 5.5 | |
var d = 30.0 % 33.0; // Sets 'd' to 30.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 setup() { | |
createCanvas(700, 400); | |
var listOfColors = [color('#aabf12'), color('#33ab12'), color('#165512'), color('#fe3fa2'), color('#a345cd')]; | |
strokeWeight(100); | |
for(var i=0;i<listOfColors.length;i++) { | |
stroke(listOfColors[i]); |
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
//This sketch draws a row of pink donuts. | |
//lots of variables up here. | |
var x = 70; | |
var y = 200; | |
var diameter = 100; | |
var hole = 40; | |
var r = 200; |
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
//This sketch draws a row of pink donuts. | |
//donut object | |
var donut = { | |
x:70, | |
y:200, | |
diameter:100, | |
hole:40 | |
}; |
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
/* Flower array by Jeannie Moreno, LWHS Computing 2017 | |
*/ | |
function setup() { | |
createCanvas(900, 400); | |
rectMode(CENTER); | |
noStroke() | |
var flowerColors = [color(159,12,233), color(240,24,175),color(17,67,16), color(212,200,31) ]; |
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
//Im typing something here | |
OlderNewer