serialVisualization/serialVisualization.pde

38 lines
645 B
Plaintext

float rawvalue=50;
float xoff = 0.0;
float xoff2 = 25532.32;
Visualization vis;
void setup() {
size(640, 360);
//vis = new BarV(150,150,10,100,0,100);
//vis = new BarH(150,150,100,10,0,100);
//vis = new Tacho(150,150,100,0,100);
vis = new Direction(150,150,100,0,100,0,1);
vis.setShowMinMax(true);
vis.setTitle("Testwert");
}
void draw() {
background(255);
//rawvalue +=random(-5,5);
//rawvalue = constrain(rawvalue, 0,100);
xoff += 0.01;
xoff2 += 0.004;
rawvalue=noise(xoff) * 100;
vis.setValue(rawvalue);
//for direction with length
//vis.setValue2(noise(xoff2));
vis.drawVis();
}