Can the OpenGL and Serial libraries work together?
in
Core Library Questions
•
2 years ago
I get an 'Invalid memory access of location' error with even the most basic sketch using both. But I haven't found any other evidence of this on teh interwebs, so maybe someone can help me out.
- import processing.serial.*;
- import processing.opengl.*;
- Serial myPort; // the serial port
- void setup() {
- size(1000,750,OPENGL);
- background(255);
- println(Serial.list());
- myPort = new Serial(this, Serial.list()[0], 9600);
- myPort.bufferUntil('\n');
- }
- void draw() {
- }
- void serialEvent(Serial myPort) {
- background(255);
- println("serial");
- }
-b
1