Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
judithleeyl
judithleeyl's Profile
3
Posts
0
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
values from serial monitor
[0 Replies]
18-Mar-2012 08:33 AM
Forum:
Integration and Hardware
Is there a way when the serial monitor runs and when there is a jump in values, I can call for an action?
i'm connecting arduino to processing.
Let's say the previous values was 414 and the next one is 294. Previous values - current value is more than 100.
How do I program the command for the previous serial and current serial?
communicating with arduino serial monitor
[0 Replies]
18-Mar-2012 01:52 AM
Forum:
Core Library Questions
Hi is there anyway I can command Processing to read from the serial monitor, second line onwards?
Because the color sensor used is required to be calibrated prior to use thus printing >In .
However Processing sketch does not recognize [in] and presents error.
pls help.
the processing code:
// This example code is in the public domain.
import processing.serial.*;
float redValue = 0; // red value
float greenValue = 0; // green value
float blueValue = 0; // blue value
float clearValue =0;
Serial myPort;
void setup() {
size(200, 200);
// List all the available serial ports
println(Serial.list());
// I know that the first port in the serial list on my mac
// is always my Arduino, so I open Serial.list()[0].
// Open whatever port is the one you're using.
myPort = new Serial(this, Serial.list()[0], 9600);
// don't generate a serialEvent() unless you get a newline character:
myPort.bufferUntil('\n');
}
void draw() {
// set the background color with the color values:
background(redValue, greenValue, blueValue);
}
void serialEvent(Serial myPort) {
// get the ASCII string:
String inString = myPort.readStringUntil('\n');
if (inString != null) {
// trim off any whitespace:
inString = trim(inString);
// split the string on the commas and convert the
// resulting substrings into an integer array:
float[] colors = float(split(inString, ","));
// if the array has at least three elements, you know
// you got the whole thing. Put the numbers in the
// color variables:
if (colors.length >=4) {
// map them to the range 0-255:
redValue = map(colors[0], 0, 1023, 0, 255);
greenValue = map(colors[1], 0, 1023, 0, 255);
blueValue = map(colors[2], 0, 1023, 0, 255);
clearValue = map(colors[3], 0, 1023, 0, 255);
}
}
}
Problem after updating iTunes to 10.5
[2 Replies]
20-Oct-2011 02:18 AM
Forum:
Integration and Hardware
Hi,
I just updated my iTunes to version 10.5 and all my processing pde that links up with Quicktime cam shows up a BLACK screen.
The PDE prints:
SGIdle failed in icvGrabFrame_QT_Cam with error -1
Does anyone have the same problem and solution for this problem.
Judith
«Prev
Next »
Moderate user : judithleeyl
Forum