Skip to content

Instantly share code, notes, and snippets.

@dashalom
dashalom / gist:769f391cd2de58d249e2
Created October 27, 2014 03:25
Hydrate.me Arduino with calibration
unsigned long currentBlinkingMillis = 0;
unsigned long currentOrderMillis = 0;
long previousBlinkingMillis = 0;
long previousOrderMillis = 0;
int ledState = LOW;
int ledIndex = 2;
int maxLedPin = 16;
int orderInterval = 100;
int blinkingInterval = 300;
@dashalom
dashalom / gist:555b2e7348d3f6c9a11a
Created October 27, 2014 03:27
Hydrate.me Processing with calibation and timer
import processing.serial.*;
import com.onformative.yahooweather.*;
YahooWeather weather;
int updateIntervallMillis = 30000;
Serial myPort; // The serial port
float sensor = 0;
float inc = 0;
class Leaf {
float currentX;
float currentY;
float startingY;
float currentA;
Leaf (float tempCurrentX, float tempCurrentY, float tempCurrentA) {
currentX = tempCurrentX;
currentY = tempCurrentY;
startingY = tempCurrentY;
currentA = tempCurrentA;
@dashalom
dashalom / gist:8389f082d808a0740170
Created September 16, 2014 08:19
ICM-Homework2-Dalit-Shalom
PShape fish;
PShape fish2;
PShape fish3;
PShape fish4;
PShape fish5;
PShape fish6;
PShape plant1;
PShape plant2;
PShape plant3;
float fishmove1;
@dashalom
dashalom / gist:1ddf8b2dd85c095caaf0
Created September 5, 2014 21:38
ICM-Homework-Dalit-Shalom-Sep-5-2014
void setup() {
size(600,400);
background(188, 187, 182);
}
void draw() {
//let's draw a raccoon in processing!
//outer ears
stroke(137, 137, 132);
fill(137, 137, 132);