Pages: [1]   Go Down
Author Topic: please hlep me .something wrong with my code plssssssss  (Read 1809 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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);
}

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

« Last Edit: March 13, 2013, 09:41:48 pm by sharathchandra » Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 309
Posts: 26496
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That's Processing.
That will at least help you find the right forum.

And don't cross-post - topics merged.
« Last Edit: March 04, 2013, 10:03:12 am by AWOL » Logged

"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.

Queens, New York
Offline Offline
Faraday Member
**
Karma: 106
Posts: 3771
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Created Libraries:
TFT_Extension, OneWireKeypad, SerialServo, (UPD)WiiClassicController, VWID

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thanx can any one post the link of processing forum
Logged

Pages: [1]   Go Up
Jump to: