Hi,
In the graph tutorial on the arduino website under "communications" where I interface processing with arduino, I get the data from the arduino with the below line of code:
MyPort = new Serial(this, Serial.list()[1], 9600);
If I send one sensor signal from the arduino to processing, how do I extract that one sensor value and make it a variable that I can put into an if statement?
Thanks,
Ana
Should the code look like this on the arduino side?
Serial.println(analogRead(variable));
and like this on the processing side?
myPort = new Serial(variable, 9600);
and what about the below part of the processing code? Is that necessary if I don't want to draw a graph but just use the variable to for example change the color of a square?
void serialEvent (Serial myPort) {
// get the ASCII string:
String inString = myPort.readStringUntil('\n');
if (inString != null) {
// trim off any whitespace:
inString = trim(inString);
// convert to an int and map to the screen height:
float inByte = float(inString);
inByte = map(inByte, 0, 1023, 0, height);
How do I make multiple points along one bezier curve, where I can attach something to these points?
----O-----O-------
With a line I can just make multiple lines and then connection points between the lines, but what about a bezier curve?
Thanks for your help,
Ana
Hi,
How do I make a bezier curve look like it grows?
It is fairly easy with a line, because I just move the two end points, but a bezier curve is rather difficult ...
Ana
Hi,
I am new to ipad development _and_ processing as well, but I am interested in learning how to make processing applications work on an ipad. I would therefore like to make a step-by-step instruction how to do the following (see below this message).
Thanks
anna
ps. I have a mac computer, by the way :-)
1) What to download? Processing of course, but what else?
- is this the one I need to download?
http://processingjs.org/download
2) How to make sure that the processing editor sees the ipad commands - do I need to place certain items in certain folders when I instal processing and the ipad add on to processing?
3) Can I simulate how the application works in the processing play window?
4) How do I "export" my aplication to an ipad, so that I can see how the finished application actually works?
... so far I went to this link: http://luckybite.com/iprocessing/
and copy pasted the code into the regular processing editor and got an error message: "Cannot find anything named "gestureRotation"
- is this because I don't have the iprocessing files positioned in the right folder on my computer, or???