I recently tried to put a simple code to capture a serial data from a microcontroller and display it. When I run the code, it works fine. But when I export it as an applet and use it using the web browser, it doesnt capture the serial data. Any configurations need to be performed for this?
Thanks
EDIT: Also, is there a way to save the images from saveFrame() to different folder other than the project folder?
here is the code:
import processing.serial.*;
int temp; Serial mfport; PFont mffont; void setup(){ mffont = loadFont("davud.vlw"); println(Serial.list()); String cport = "COM23"; mfport = new Serial(this,cport,9600);
I am a noob in processing, and I need a help in reciprocating a block in a loop. I have implemented it. But wanna know if there is any code simpler than this!.
The receiprocation must be in a loop (like the piston in crank slider mechanism).
I want to design a moving object in 2d. Basically, I chose a triangle and i can only move it up and down. All I need is, when I press left button, it must rotate counter-clockwise and when i press right, it must rotate clockwise and then continue in that direction when up/down is pressed.
I am trying to play a sound file in processing. When i play the sound file, it starts away nice. but as time progress, the sound seems to distort/sound rapidly (the sound becomes indistinct.) I tried different bitrate and also without bitrate.
I wanted to loop a sound file until a condititon is met.