Removed unnecesary code from arduino audio visualizer
This commit is contained in:
@@ -14,19 +14,12 @@ void setup() {
|
||||
input.start();
|
||||
analyzer = new Amplitude(this);
|
||||
analyzer.input(input);
|
||||
}
|
||||
}
|
||||
|
||||
void draw() {
|
||||
float vol = analyzer.analyze();
|
||||
float normal = 10+vol*200;
|
||||
|
||||
int out = int(map(normal, 0, 60, 0, 11));
|
||||
|
||||
if (port.available() > 0) {
|
||||
String s = port.readString();
|
||||
println(s);
|
||||
}
|
||||
|
||||
port.write(Integer.toString(out));
|
||||
port.write(" ");
|
||||
}
|
||||
Reference in New Issue
Block a user