mirror of
https://github.com/processing/processing4.git
synced 2026-05-05 02:15:30 +02:00
16 lines
322 B
Plaintext
16 lines
322 B
Plaintext
import processing.io.*;
|
|
MCP3008 adc;
|
|
|
|
// see setup.png in the sketch folder for wiring details
|
|
|
|
void setup() {
|
|
//printArray(SPI.list());
|
|
adc = new MCP3008(SPI.list()[0]);
|
|
}
|
|
|
|
void draw() {
|
|
background(adc.getAnalog(0) * 255);
|
|
fill(adc.getAnalog(1) * 255);
|
|
ellipse(width/2, height/2, width * 0.75, width * 0.75);
|
|
}
|