Go Down

Topic: please hlep me .something wrong with my code plssssssss (Read 1 time) previous topic - next topic

sharathchandra

import processing.serial.*;
Serial port;
int inp = 0;
int wdt=800, ht=600;
void setup()
{
  println(Serial.list());
  port= new Serial(this,Serial.list()[0],9600);
  size(800,600);
}
void serialEvent (Serial port)
{
  while(port.available()==0);
  inp=port.read();
}
void draw()
{
  fill(0,0,0);
  text(inp, 400,300);
  textSize(25);
}


sharathchandra

#1
Mar 04, 2013, 03:46 pm Last Edit: Mar 14, 2013, 03:41 am by sharathchandra Reason: 1
import processing.serial.*;
Serial port;
int inp = 0;
int wdt=800, ht=600;
void setup()
{
 println(Serial.list());
 port= new Serial(this,Serial.list()[0],9600);
 size(800,600);
}
void serialEvent (Serial port)
{
 while(port.available()==0);
 inp=port.read();
}
void draw()
{
 fill(0,0,0);
 text(inp, 400,300);
 textSize(25);
}

these have to read serial data from arduino and print the value, it is printing but overlapping in processing


AWOL

#2
Mar 04, 2013, 04:01 pm Last Edit: Mar 04, 2013, 04:03 pm by AWOL Reason: 1
That's Processing.
That will at least help you find the right forum.

And don't cross-post - topics merged.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

HazardsMind

A little information is required.
What is the problem, what are you trying to do, what are you expecting and what are you getting? It would also be helpful if you included some comments in the code.

Please note there is another forum for processing problems.
My GitHub:
https://github.com/AndrewMascolo?tab=repositories

sharathchandra

thanx can any one post the link of processing forum

Go Up
 

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.
Name:
Email:

shortcuts: alt+s submit/post or alt+p preview