# Processing

**URL:** https://discourse.processing.org/c/processing/6.md?no_subcategories=false&page=386

[Latest](https://discourse.processing.org/latest.md) · [Categories](https://discourse.processing.org/categories.md) · [Tags](https://discourse.processing.org/tags.md)

**Page:** 387

---

## [Picking with JAVA2D](https://discourse.processing.org/t/picking-with-java2d/859)

<div class="topic-metadata">

**Author:** [@ferrari](https://discourse.processing.org/u/ferrari)\
**Replies:** 4\
**Last updated:** [June 19, 2018, 8:30pm UTC](https://discourse.processing.org/t/picking-with-java2d/859 "2018-06-19T20:30:35Z")

</div>

hello, is possible to use picking library with the default renderer? (java2d, no P3D or P2D) in processing 1.5 it was possible…but in processing 3…not anymore. any idea? or other library o code? i need for pick compl…

---

## [Use 2 leds and 2 buttons using arduino and processing](https://discourse.processing.org/t/use-2-leds-and-2-buttons-using-arduino-and-processing/1020)

<div class="topic-metadata">

**Author:** [@animebrowny](https://discourse.processing.org/u/animebrowny)\
**Replies:** 2\
**Last updated:** [June 19, 2018, 1:39am UTC](https://discourse.processing.org/t/use-2-leds-and-2-buttons-using-arduino-and-processing/1020 "2018-06-19T01:39:42Z")

</div>

Hi everyone, I’m kind of stuck on something. I am trying to work 2 leds using arduino with 2 buttons in processing. The goal is to link 1 button to one led. Now the problem. I have tried several things, but i cannot ge…

---

## [Serial Communication Issues--Arduino](https://discourse.processing.org/t/serial-communication-issues-arduino/1032)

<div class="topic-metadata">

**Author:** [@hbara](https://discourse.processing.org/u/hbara)\
**Replies:** 3\
**Last updated:** [June 19, 2018, 1:19am UTC](https://discourse.processing.org/t/serial-communication-issues-arduino/1032 "2018-06-19T01:19:30Z")

</div>

Hi! I’m trying to re-write a processing program that was designed for v2 to work with v3. In short, I’m trying to take data from an Arduino and plot, calculations, etc in Processing. It wasn’t clear what about the progra…

---

## [Help to start color sequence in the game "Simon says" in Processing](https://discourse.processing.org/t/help-to-start-color-sequence-in-the-game-simon-says-in-processing/882)

<div class="topic-metadata">

**Author:** [@Scorpion](https://discourse.processing.org/u/Scorpion)\
**Replies:** 1\
**Last updated:** [June 19, 2018, 12:15am UTC](https://discourse.processing.org/t/help-to-start-color-sequence-in-the-game-simon-says-in-processing/882 "2018-06-19T00:15:47Z")

</div>

I’m starting to make the game “Simon says” and I do not know how to start generating the “guessList”, that the random colors come out so that the user can then repeat the sequence, how do I continue? for the moment I hav…

---

## [Serial.read() gives null value from Arduino and or the port is not open on processing side](https://discourse.processing.org/t/serial-read-gives-null-value-from-arduino-and-or-the-port-is-not-open-on-processing-side/747)

<div class="topic-metadata">

**Author:** [@mgullefer01](https://discourse.processing.org/u/mgullefer01)\
**Replies:** 11\
**Last updated:** [June 18, 2018, 10:05pm UTC](https://discourse.processing.org/t/serial-read-gives-null-value-from-arduino-and-or-the-port-is-not-open-on-processing-side/747 "2018-06-18T22:05:17Z")

</div>

I’m writing a program that reads sensor data sent from Arduino and then processes it and turns it into a graph which is the exported as PDF. I originally managed to get the serial communications working between processin…

---

## [Uncomplete circle](https://discourse.processing.org/t/uncomplete-circle/1060)

<div class="topic-metadata">

**Author:** [@josephh](https://discourse.processing.org/u/josephh)\
**Replies:** 2\
**Last updated:** [June 18, 2018, 9:43pm UTC](https://discourse.processing.org/t/uncomplete-circle/1060 "2018-06-18T21:43:50Z")

</div>

Hi guys, Is there a way to draw an uncomplete circle without using beginShape() and curveVertex() like this ? : int diam = 200; void setup(){ size(500,500); translate(width/2,height/2); stroke(#E044A2); backg…

---

## [Not receiving all data from Arduino Serial port](https://discourse.processing.org/t/not-receiving-all-data-from-arduino-serial-port/1044)

<div class="topic-metadata">

**Author:** [@rluxon](https://discourse.processing.org/u/rluxon)\
**Replies:** 2\
**Last updated:** [June 18, 2018, 5:30am UTC](https://discourse.processing.org/t/not-receiving-all-data-from-arduino-serial-port/1044 "2018-06-18T05:30:32Z")

</div>

Hey everyone, total noob here to programming. I have an issue with a script (is it called that for processing?) I receive 2 of the 3 parts of data, but cant for the life of me get the soil moisture readings. I know its …

---

## [Pressing multiple keys at once on different rows](https://discourse.processing.org/t/pressing-multiple-keys-at-once-on-different-rows/1023)

<div class="topic-metadata">

**Author:** [@widemouthfrog1](https://discourse.processing.org/u/widemouthfrog1)\
**Replies:** 3\
**Last updated:** [June 18, 2018, 12:36am UTC](https://discourse.processing.org/t/pressing-multiple-keys-at-once-on-different-rows/1023 "2018-06-18T00:36:57Z")

</div>

public class Main extends PApplet{ public static void main(String\[\] args) { PApplet.main("Main"); } Map\<Character, Boolean\> buttonsPressed = new HashMap\<Character, Boolean\>(); Map\<Character, Boolean\> button…

---

## [Novice coder needing help - cannot be resolved to a variable error](https://discourse.processing.org/t/novice-coder-needing-help-cannot-be-resolved-to-a-variable-error/1031)

<div class="topic-metadata">

**Author:** [@JRK](https://discourse.processing.org/u/JRK)\
**Replies:** 2\
**Last updated:** [June 17, 2018, 7:20pm UTC](https://discourse.processing.org/t/novice-coder-needing-help-cannot-be-resolved-to-a-variable-error/1031 "2018-06-17T19:20:04Z")

</div>

I am a beginner and finding a problem. I wrote the following code and had error message “a cannot be resolved to a variable”. The rectangle appears fine with numbers but will not accept a declared integer. void setup ()…

---

## [How to name objects with variables?](https://discourse.processing.org/t/how-to-name-objects-with-variables/1027)

<div class="topic-metadata">

**Author:** [@RipplB](https://discourse.processing.org/u/RipplB)\
**Replies:** 1\
**Last updated:** [June 17, 2018, 3:16pm UTC](https://discourse.processing.org/t/how-to-name-objects-with-variables/1027 "2018-06-17T15:16:13Z")

</div>

I have a class for a game, and i want to create more objects from that class. For that, i’d like to use a for loop. How to name the separate objects correctly? It is important, that later on i’d like to use their functio…

---

## [Random number between two numbers](https://discourse.processing.org/t/random-number-between-two-numbers/1017)

<div class="topic-metadata">

**Author:** [@janberkjk](https://discourse.processing.org/u/janberkjk)\
**Replies:** 11\
**Last updated:** [June 17, 2018, 2:24pm UTC](https://discourse.processing.org/t/random-number-between-two-numbers/1017 "2018-06-17T14:24:01Z")

</div>

Hello people, I am trying to get a nuber between two numbers, but with the poor code i write so far i get a random number between 1 and 10, but i want bgfoto between 7 and 10, can you help me please? PImage foto; PImag…

---

## [Imports, image metadata - adding text to png](https://discourse.processing.org/t/imports-image-metadata-adding-text-to-png/1025)

<div class="topic-metadata">

**Author:** [@lmccandless](https://discourse.processing.org/u/lmccandless)\
**Replies:** 1\
**Last updated:** [June 17, 2018, 2:17pm UTC](https://discourse.processing.org/t/imports-image-metadata-adding-text-to-png/1025 "2018-06-17T14:17:34Z")

</div>

I’m trying to add text metadata to a png, I found java code to do it on stackoverflow. I’m trying to get it to work in processing, but I can’t seem to find the right imports for some these classes the code uses import j…

---

## [Scrolling and image](https://discourse.processing.org/t/scrolling-and-image/1003)

<div class="topic-metadata">

**Author:** [@poppanona](https://discourse.processing.org/u/poppanona)\
**Replies:** 5\
**Last updated:** [June 17, 2018, 6:09am UTC](https://discourse.processing.org/t/scrolling-and-image/1003 "2018-06-17T06:09:26Z")

</div>

How do I scroll an image

---

## [OpenCV for Processing -- Extracting Histogram Data](https://discourse.processing.org/t/opencv-for-processing-extracting-histogram-data/993)

<div class="topic-metadata">

**Author:** [@joshc6464](https://discourse.processing.org/u/joshc6464)\
**Replies:** 1\
**Last updated:** [June 16, 2018, 5:32pm UTC](https://discourse.processing.org/t/opencv-for-processing-extracting-histogram-data/993 "2018-06-16T17:32:44Z")

</div>

Hello all, New to OpenCV for processing and I am looking to extract the data from the bins of a histogram once I have used the findHistogram method. I have seen this functionality in the actual Java OpenCV, but I cannot…

---

## [How do i make my webcam detect a pose I make?](https://discourse.processing.org/t/how-do-i-make-my-webcam-detect-a-pose-i-make/990)

<div class="topic-metadata">

**Author:** [@WindJammer](https://discourse.processing.org/u/WindJammer)\
**Replies:** 3\
**Last updated:** [June 16, 2018, 2:00pm UTC](https://discourse.processing.org/t/how-do-i-make-my-webcam-detect-a-pose-i-make/990 "2018-06-16T14:00:16Z")

</div>

Hi, I’ve started using Processing for an interactive artwork i’m working on. I’m looking for the best/easiest way to solve the following issue: Set a boolean variable to true, if I take a hold of THIS POSE in front of …

---

## [How to pan an image](https://discourse.processing.org/t/how-to-pan-an-image/1002)

<div class="topic-metadata">

**Author:** [@poppanona](https://discourse.processing.org/u/poppanona)\
**Replies:** 1\
**Last updated:** [June 16, 2018, 12:43pm UTC](https://discourse.processing.org/t/how-to-pan-an-image/1002 "2018-06-16T12:43:43Z")

</div>

I have an image bigger than the display window. How do I pan the image throught the display window?

---

## [Applet use in nested classes](https://discourse.processing.org/t/applet-use-in-nested-classes/827)

<div class="topic-metadata">

**Author:** [@ZazoThex](https://discourse.processing.org/u/ZazoThex)\
**Replies:** 3\
**Last updated:** [June 16, 2018, 9:15am UTC](https://discourse.processing.org/t/applet-use-in-nested-classes/827 "2018-06-16T09:15:56Z")

</div>

Hello all. As an exercise in becoming more proficient at Processing, I’ve been trying to make my own GUI instead of using one of the great already-made libraries like CP5. I’ve been doing well enough, but am getting hung…

---

## [2d arrays not reconised by function](https://discourse.processing.org/t/2d-arrays-not-reconised-by-function/1006)

<div class="topic-metadata">

**Author:** [@ElectroSquid](https://discourse.processing.org/u/ElectroSquid)\
**Replies:** 1\
**Last updated:** [June 16, 2018, 7:22am UTC](https://discourse.processing.org/t/2d-arrays-not-reconised-by-function/1006 "2018-06-16T07:22:34Z")

</div>

i have a function (not complete) thats supposed to asjust 2 variables based on 2 2darrays, in\[\]\[\] and out\[\]\[\], but i get the error msg: the function error() expects parameters like error(float\[\]\[\],float\[\]\[\]) heres the f…

---

## [Processing (image display) via Arduino ultrasonic sensor](https://discourse.processing.org/t/processing-image-display-via-arduino-ultrasonic-sensor/947)

<div class="topic-metadata">

**Author:** [@komats](https://discourse.processing.org/u/komats)\
**Replies:** 2\
**Last updated:** [June 16, 2018, 6:22am UTC](https://discourse.processing.org/t/processing-image-display-via-arduino-ultrasonic-sensor/947 "2018-06-16T06:22:23Z")

</div>

Hi, I am just starting to explore posibilities to make something work in processing via arduino (sensors). On school exhibition I want to make a picture display that shows one image at the time on the wall (with a proje…

---

## [Stroke won't change colour when clicked](https://discourse.processing.org/t/stroke-wont-change-colour-when-clicked/793)

<div class="topic-metadata">

**Author:** [@alessandrajoy](https://discourse.processing.org/u/alessandrajoy)\
**Replies:** 11\
**Last updated:** [June 16, 2018, 4:30am UTC](https://discourse.processing.org/t/stroke-wont-change-colour-when-clicked/793 "2018-06-16T04:30:43Z")

</div>

This is my painting program. It has a frame and colours at the bottom. I want the stroke to change to the colour of the image at the bottom when clicked. But it is not working. any suggestions? here is my code and images…

---

## [Is there any way to communicate with the graphics card?](https://discourse.processing.org/t/is-there-any-way-to-communicate-with-the-graphics-card/791)

<div class="topic-metadata">

**Author:** [@Grimtin10](https://discourse.processing.org/u/Grimtin10)\
**Replies:** 13\
**Last updated:** [June 16, 2018, 4:24am UTC](https://discourse.processing.org/t/is-there-any-way-to-communicate-with-the-graphics-card/791 "2018-06-16T04:24:57Z")

</div>

I want to be able to draw pixels to the screen, or use the shape function, on the graphics card without using OpenGL or DirectX, do I have to write my own library?

---

## [Problem while I learning Arrray](https://discourse.processing.org/t/problem-while-i-learning-arrray/991)

<div class="topic-metadata">

**Author:** [@KangYunJae](https://discourse.processing.org/u/KangYunJae)\
**Replies:** 4\
**Last updated:** [June 16, 2018, 1:50am UTC](https://discourse.processing.org/t/problem-while-i-learning-arrray/991 "2018-06-16T01:50:11Z")

</div>

This Is Working Version of What I learn. float\[\] x = new float\[5\]; void setup() { size(1080,720); noStroke(); } void draw() { background(0); x\[0\] += 0.5; x\[1\] += 0.5; x\[2\] += 0.5; x\[3\] += 0.5; x\[4\] +=…

---

## [Int does not match with processing.data.XML](https://discourse.processing.org/t/int-does-not-match-with-processing-data-xml/983)

<div class="topic-metadata">

**Author:** [@ben\_suddenly](https://discourse.processing.org/u/ben_suddenly)\
**Replies:** 2\
**Last updated:** [June 16, 2018, 1:12am UTC](https://discourse.processing.org/t/int-does-not-match-with-processing-data-xml/983 "2018-06-16T01:12:40Z")

</div>

for some reason i cant get any of the: \<yweather:wind xmlns:yweather=“http://xml.weather.yahoo.com/ns/rss/1.0” chill=“64” direction=“275” speed=“40.23”/\> data into processing the site im pulling from is the same as th…

---

## [Possible to have size smaller than full screen positioned top left?](https://discourse.processing.org/t/possible-to-have-size-smaller-than-full-screen-positioned-top-left/941)

<div class="topic-metadata">

**Author:** [@Grow](https://discourse.processing.org/u/Grow)\
**Replies:** 4\
**Last updated:** [June 15, 2018, 8:58pm UTC](https://discourse.processing.org/t/possible-to-have-size-smaller-than-full-screen-positioned-top-left/941 "2018-06-15T20:58:56Z")

</div>

I have an led pixel matrix that is 180 W x 30 H. It is driven by a sending card from HDMI output from a computer. When the computer hooks up it sees the “pixel matrix” as a 1920 x 1080 screen even though it is only 180…

---

## [Problem with arraylist](https://discourse.processing.org/t/problem-with-arraylist/980)

<div class="topic-metadata">

**Author:** [@ElectroSquid](https://discourse.processing.org/u/ElectroSquid)\
**Replies:** 2\
**Last updated:** [June 15, 2018, 9:09am UTC](https://discourse.processing.org/t/problem-with-arraylist/980 "2018-06-15T09:09:55Z")

</div>

so, i have been attempting to create a neural network in processing, but after i get the error: ArrayIndexOutOfBoundException: Index 0, Size:0, i can not think of any way that this is caused ArrayList\<Float\>generateNode…

---

## [Display data in window from Arduino serial port](https://discourse.processing.org/t/display-data-in-window-from-arduino-serial-port/955)

<div class="topic-metadata">

**Author:** [@albertoG1](https://discourse.processing.org/u/albertoG1)\
**Replies:** 1\
**Last updated:** [June 15, 2018, 7:18am UTC](https://discourse.processing.org/t/display-data-in-window-from-arduino-serial-port/955 "2018-06-15T07:18:00Z")

</div>

Hi, I have a very simple program made with a Nano Arduino and a humidity sensor. The sensor obtains a data per second and shows it in the serial port with two values, the first with values from zero to 1023 of the senso…

---

## [Error trying to add super class objects to subclass arraylist](https://discourse.processing.org/t/error-trying-to-add-super-class-objects-to-subclass-arraylist/964)

<div class="topic-metadata">

**Author:** [@RafeArnold](https://discourse.processing.org/u/RafeArnold)\
**Replies:** 4\
**Last updated:** [June 14, 2018, 7:43pm UTC](https://discourse.processing.org/t/error-trying-to-add-super-class-objects-to-subclass-arraylist/964 "2018-06-14T19:43:05Z")

</div>

I have an ArrayList that stores instances of the subclass (SubClass) of another class (SupClass). I have already defined the classes, SupClass and SubClass (with SubClass extending SupClass) and there is already a SupCla…

---

## [How to overlay an image over another in P3D](https://discourse.processing.org/t/how-to-overlay-an-image-over-another-in-p3d/959)

<div class="topic-metadata">

**Author:** [@rainfox](https://discourse.processing.org/u/rainfox)\
**Replies:** 7\
**Last updated:** [June 14, 2018, 7:17pm UTC](https://discourse.processing.org/t/how-to-overlay-an-image-over-another-in-p3d/959 "2018-06-14T19:17:11Z")

</div>

In processing.js, how would you overlay an image over another one in P3D mode? Here is my code: /\* @pjs preload="duck.jpg"; \*/ /\* @pjs preload="a.png"; \*/ PImage imageDuck; PImage imageA; void…

---

## [Does Processing Understand Scientific Notation?](https://discourse.processing.org/t/does-processing-understand-scientific-notation/969)

<div class="topic-metadata">

**Author:** [@xxxlaf](https://discourse.processing.org/u/xxxlaf)\
**Replies:** 2\
**Last updated:** [June 14, 2018, 7:08pm UTC](https://discourse.processing.org/t/does-processing-understand-scientific-notation/969 "2018-06-14T19:08:44Z")

</div>

Does processing know that when I type 6.673e-11 as a float it should come out 0.00000000006673 ? Thanks.

---

## [Troubles making a model of solarsail](https://discourse.processing.org/t/troubles-making-a-model-of-solarsail/950)

<div class="topic-metadata">

**Author:** [@MAXimum\_effort](https://discourse.processing.org/u/MAXimum_effort)\
**Replies:** 2\
**Last updated:** [June 14, 2018, 3:25pm UTC](https://discourse.processing.org/t/troubles-making-a-model-of-solarsail/950 "2018-06-14T15:25:13Z")

</div>

I am currently working on a model to visualize/calculate the flight path of a solar sail (a type of spacecraft). But I have troubles with making the orbit of the spacecraft dependent on physics calculations. Whenever I …

[Previous page](https://discourse.processing.org/c/processing/6.md?no_subcategories=false&page=385)

[Next page](https://discourse.processing.org/c/processing/6.md?no_subcategories=false&page=387)
