Making serial library work in browser.
in
Core Library Questions
•
11 months ago
Hi,
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);
}
void draw(){
while(mfport.available()>0){
background(255);
temp = mfport.read();
println(temp);
fill(0);
String par = nf(temp,2,0);
text(par,20,20);
}
}
1