
Finding the SVG details opens up a whole new jar of grubs, means that the tiny ESP8266 can grow its own display unit.
Just the Juicy HTML Gui bits |
void drawGraph() {
String out = ""; // start with a clean sheet
int y2;
char temp[100];
out += "<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"1000\" height=\"800\">\n";
out += "<g stroke=\"black\">\n"; // create the graphics arena
out += "<circle cx=\"150\" cy=\"150\" r=\"100\" fill=\"rgb(160,160,250)\" />\n"; // the blue sun
int y = 5;
for (int x = 10; x < 990; x+= 10) {
y2 = analogRead(A0); // the Oscope analog , quite boring actually
sprintf(temp, "<line x1=\"%d\" y1=\"%d\" x2=\"%d\" y2=\"%d\" stroke-width=\"3\" />\n", x, 500 - y, x + 10, 500 - y2);
out += temp; // and set up SVG graphic in buffer
y = y2;
}
out += "</g>\n</svg>\n"; // before presenting the SVG graphic to the world.
server.send ( 200, "image/svg+xml", out);
}
|
Immediate plans are to create a simple 3D printed oscilloscope probe.... and where ever your probe goes your phone will go and display the data too ...remote or otherwise... with logging too.
Compatable modules ESP8266 series -07 and -12 have the adc input...