diff --git a/libraries/Portenta_Camera/extras/CameraRawBytesVisualizer/CameraRawBytesVisualizer.pde b/libraries/Portenta_Camera/extras/CameraRawBytesVisualizer/CameraRawBytesVisualizer.pde index e951a4364..7c8393fdc 100644 --- a/libraries/Portenta_Camera/extras/CameraRawBytesVisualizer/CameraRawBytesVisualizer.pde +++ b/libraries/Portenta_Camera/extras/CameraRawBytesVisualizer/CameraRawBytesVisualizer.pde @@ -13,8 +13,8 @@ import java.nio.ByteOrder; Serial myPort; // must match resolution used in the sketch -final int cameraWidth = 324; -final int cameraHeight = 244; +final int cameraWidth = 320; +final int cameraHeight = 240; final int cameraBytesPerPixel = 1; final int bytesPerFrame = cameraWidth * cameraHeight * cameraBytesPerPixel; @@ -23,14 +23,14 @@ byte[] frameBuffer = new byte[bytesPerFrame]; void setup() { - size(324, 244); + size(640, 480); // if you have only ONE serial port active //myPort = new Serial(this, Serial.list()[0], 9600); // if you have only ONE serial port active // if you know the serial port name //myPort = new Serial(this, "COM5", 9600); // Windows - myPort = new Serial(this, "/dev/ttyACM0", 9600); // Linux + myPort = new Serial(this, "/dev/ttyACM0", 921600); // Linux //myPort = new Serial(this, "/dev/cu.usbmodem14401", 9600); // Mac // wait for full frame of bytes @@ -41,7 +41,9 @@ void setup() void draw() { - image(myImage, 0, 0); + PImage img = myImage.copy(); + img.resize(640, 480); + image(img, 0, 0); } void serialEvent(Serial myPort) {