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
import time | |
import board | |
import neopixel | |
from digitalio import DigitalInOut, Direction, Pull | |
pixel_pin = board.D2 | |
num_pixels = 12 | |
switch = DigitalInOut(board.D3) | |
switch.direction = Direction.INPUT |
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
def binary_to_decimal_iterative(binary): | |
total = 0 | |
for i in range(len(binary)): | |
if binary[i] == '1': | |
pass | |
return total |
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: Marching Elephants | |
Imagined, Designed, and Programmed by: Carly Brown | |
Date: October 16, 2017 | |
Description: Textile Design Project | |
*/ | |
function setup() { | |
createCanvas(10000, 10000); |
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(2000,2000); | |
background(0,0,0); | |
angleMode(DEGREES); | |
// brownhead(); | |
peachhead(); | |
// normalhead(); | |
// smilingmouth(); |
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
/* | |
Example of choosing a random function | |
Notice this program re-randomizes the row of shapes every time it's run! | |
*/ | |
function setup() { | |
createCanvas(800, 400); | |
background(50); | |
//draw some shapes to test. These aren't randomized |
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
//Modified from P5 example at: https://p5js.org/examples/dom-video-capture.html | |
var capture; | |
function setup() { | |
createCanvas(320, 240); | |
capture = createCapture(VIDEO); | |
capture.size(320, 240); | |
capture.hide(); |
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
//baby pic used in class example is by ms. brooks. cite url for pics found online | |
var img; | |
//preload will load before setup runs | |
function preload() { | |
//this relative file path starts in the same folder as your sketch. | |
//In other words, in this example, make a folder called images in the same | |
//folder as your sketch file (sketch.js) and then put the image file ("kittens.jpg") | |
//inside of that. | |
img = loadImage("images/jomy.jpg"); |
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
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
/* | |
Title: | |
Imagined, Designed, and Programmed by: | |
Date: | |
Description: | |
NewerOlder