Skip to content

Instantly share code, notes, and snippets.

const float R1 = 51;
void setup() {
Serial.begin(9600);
}
void loop() {
float val,v,R,T;
val = analogRead(A5);
v = 5*val/1024;
R = v*R1/(5-v);
const int A = 10;
const int B = 2;
const int C = 3;
const int D = 4;
const int E = 5;
const int F = 6;
const int G = 7;
const int DIG1 = 8;
const int DIG2 = 9;
int i;
int val = 0;
void setup() {
Serial.begin(9600);
pinMode(2, HIGH);
}
void loop() {
int val = 0;
void setup() {
Serial.begin(9600);
pinMode(2, HIGH);
}
void loop() {
int val = 0;
void setup() {
Serial.begin(9600);
}
void loop() {
if(Serial.available() > 0) {
void setup() {
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
digitalWrite(8, LOW);
digitalWrite(9, LOW);
}
void loop() {
void setup() {
myPort = new Serial(this,"/dev/cu.usbmodem14121", 9600);
}
void draw() {
fill(value);
rect(25, 25, 50, 50);
}
void setup() {
Serial.begin(115200);
}
void loop() {
int val = analogRead(A5);
int out = map(val,0,1023,0,255);
Serial.write(out);
}
import processing.serial.*;
Serial myPort;
float x;
int y;
void setup() {
size(700,500);
background(#FFFFFF);
myPort = new Serial(this, Serial.list()[1], 115200);
}
<?php
$filename = trim(fgets(STDIN));
exec('ffmpeg -i '. $filename .' new.gif');
?>