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
const int transistorPin = 9; | |
int redSwitch = 3; | |
int switchValue = 0; | |
int poten = A0; | |
void setup() { | |
Serial.begin(9600); | |
pinMode(transistorPin, OUTPUT); | |
pinMode(redSwitch, INPUT); | |
pinMode(poten, 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
const int transistorPin = 9; | |
int redSwitch = 8; | |
int switchValue = 0; | |
int poten = A0; | |
int B = 3; //Connect Blue led to Digital pin 3 | |
int R = 5; //Connect Red led to Digital pin 5 | |
int G = 6; //Connect Green led to Digital pin 6 |
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
//electromagnet test 01 | |
int onBtn = 2; | |
int btnState = 0; | |
int mag = 9; | |
int led = 13; | |
// the setup function runs once when you press reset or power the board | |
void setup() { | |
// initialize digital pin 13 as an output. | |
pinMode(mag, 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
#define SensorLED 13 | |
#define SensorINPUT 3 //Connect the sensor to digital Pin 3 which is Interrupts 1. | |
unsigned char state = 0; | |
int cnt = 0; | |
void setup() | |
{ | |
pinMode(SensorLED, OUTPUT); | |
pinMode(SensorINPUT, 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.2/p5.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.2/addons/p5.dom.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.2/addons/p5.sound.min.js"></script> | |
<script src="moment.js"></script> | |
<link rel="stylesheet" type="text/css" href="style.css"> |
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
int led = 9; | |
int btn = 2; | |
int buttonState = 0; | |
int lastButtonState = 0; | |
void setup() { | |
pinMode(led, OUTPUT); | |
pinMode(btn, INPUT); | |
Serial.begin(9600); |
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 "Interval.h" | |
/* | |
A Brush Candle - Hayley Hwang | |
for Lighting & Interactivity Class | |
- NeoPixel RGBW x 1 | |
- Piezo Sensor x 1 | |
- 1mOhm x 1 | |
*/ | |
#include <Adafruit_NeoPixel.h> |
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 "Interval.h" | |
#include <Adafruit_NeoPixel.h> | |
const int knockSensor = A0; | |
int val = 0; | |
#define PIN 6 | |
const int numPixels = 7; |
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 <CapacitiveSensor.h> | |
/* | |
CapitiveSense Library Demo Sketch | |
Paul Badger 2008 | |
Uses a high value resistor e.g. 10M between send pin and receive pin | |
Resistor effects sensitivity, experiment with values, 50K - 50M. Larger resistor values yield larger sensor values. | |
Receive pin is the sensor pin - try different amounts of foil/metal on this pin | |
*/ |
OlderNewer