# Processing

**URL:** https://discourse.processing.org/c/processing/6.md?page=76

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

**Page:** 77

---

## [Amazonaws library: how to include it?](https://discourse.processing.org/t/amazonaws-library-how-to-include-it/37419)

<div class="topic-metadata">

**Author:** [@Manfre](https://discourse.processing.org/u/Manfre)\
**Replies:** 4\
**Last updated:** [June 17, 2022, 12:56pm UTC](https://discourse.processing.org/t/amazonaws-library-how-to-include-it/37419 "2022-06-17T12:56:47Z")

</div>

Hello. I am not a programmer but I often use Processing. Now I am trying to use the amazonaws library with very bad results. First of all I built the folder structure to store the 3 files named “aws-iot-device-sdk-java.j…

---

## [Processing and Arduino: how to change color according to the status of a digital input?](https://discourse.processing.org/t/processing-and-arduino-how-to-change-color-according-to-the-status-of-a-digital-input/37579)

<div class="topic-metadata">

**Author:** [@samiam85](https://discourse.processing.org/u/samiam85)\
**Replies:** 4\
**Last updated:** [June 17, 2022, 6:10am UTC](https://discourse.processing.org/t/processing-and-arduino-how-to-change-color-according-to-the-status-of-a-digital-input/37579 "2022-06-17T06:10:45Z")

</div>

Dear All, I am new in the “Processing world”. I have connected Processing to Arduino. What I can do, it is to push a button and activate some Digital Outputs in Arduino. Now, what I wanna do is: according to the statu…

---

## [Bar chart - Display data when hovering](https://discourse.processing.org/t/bar-chart-display-data-when-hovering/37571)

<div class="topic-metadata">

**Author:** [@Erif](https://discourse.processing.org/u/Erif)\
**Replies:** 12\
**Last updated:** [June 16, 2022, 1:31pm UTC](https://discourse.processing.org/t/bar-chart-display-data-when-hovering/37571 "2022-06-16T13:31:55Z")

</div>

Hi all, I’m trying to represent a very basic 1-column table as a bar chart. The .csv file reads as follows: Value 50 100 150 200 250 300 350 400 450 500 My problem is I can’t manage to display each value o…

---

## [I need help with the command save() and begin/endRecord()](https://discourse.processing.org/t/i-need-help-with-the-command-save-and-begin-endrecord/37563)

<div class="topic-metadata">

**Author:** [@Ld44hbxhkhr](https://discourse.processing.org/u/Ld44hbxhkhr)\
**Replies:** 6\
**Last updated:** [June 16, 2022, 8:34am UTC](https://discourse.processing.org/t/i-need-help-with-the-command-save-and-begin-endrecord/37563 "2022-06-16T08:34:50Z")

</div>

Greetings, I have a problem, where Processing won’t save a pdf/jpg-file, after I especially asked it for this. I at first used the both commands save() and begin/endRecord() in my main sketch with no problems, then mov…

---

## [Tilling Reaction Diffusion](https://discourse.processing.org/t/tilling-reaction-diffusion/37518)

<div class="topic-metadata">

**Author:** [@domini8888](https://discourse.processing.org/u/domini8888)\
**Replies:** 2\
**Last updated:** [June 16, 2022, 3:14am UTC](https://discourse.processing.org/t/tilling-reaction-diffusion/37518 "2022-06-16T03:14:29Z")

</div>

Hi all, I’ve recently learned about reaction diffusion, and want to create a set of images that can be tiled on all four sides. I read a paper entitled “Designing the Desert” (https://www.researchgate.net/publication/296…

---

## [Creating a Processing Library from JavaScript code](https://discourse.processing.org/t/creating-a-processing-library-from-javascript-code/37508)

<div class="topic-metadata">

**Author:** [@Grumpy\_Mike](https://discourse.processing.org/u/Grumpy_Mike)\
**Replies:** 3\
**Last updated:** [June 15, 2022, 7:47pm UTC](https://discourse.processing.org/t/creating-a-processing-library-from-javascript-code/37508 "2022-06-15T19:47:30Z")

</div>

A recent kick starter project was for some Bluetooth connected dice. GoDice The makers then posted an API in the form of a JavaScript example. GoDice JavaScript API Anyone know how this can be made to run in Processi…

---

## [In shooting game, How can I add gravity?](https://discourse.processing.org/t/in-shooting-game-how-can-i-add-gravity/37552)

<div class="topic-metadata">

**Author:** [@Pleasegod](https://discourse.processing.org/u/Pleasegod)\
**Replies:** 2\
**Last updated:** [June 15, 2022, 11:08am UTC](https://discourse.processing.org/t/in-shooting-game-how-can-i-add-gravity/37552 "2022-06-15T11:08:23Z")

</div>

Hello, I’m korean student. In shooting game, How Can I add gravity When falling start and when shape die and respawn, how does it restart gravity from 0 to end. I’m not good at English and please when you answer my que…

---

## [I dont understand why my objects are out of sync?](https://discourse.processing.org/t/i-dont-understand-why-my-objects-are-out-of-sync/37499)

<div class="topic-metadata">

**Author:** [@SpaceWave](https://discourse.processing.org/u/SpaceWave)\
**Replies:** 3\
**Last updated:** [June 15, 2022, 8:52am UTC](https://discourse.processing.org/t/i-dont-understand-why-my-objects-are-out-of-sync/37499 "2022-06-15T08:52:58Z")

</div>

Excuse my formatting as this is my first forum post, thank you in advance. I have written some code to generate balls that form a circle around (0,0), and then move a set distance away from (0,0) before reversing their …

---

## [Problem with JUnit in a Processing Library](https://discourse.processing.org/t/problem-with-junit-in-a-processing-library/37232)

<div class="topic-metadata">

**Author:** [@AlexRivas](https://discourse.processing.org/u/AlexRivas)\
**Replies:** 2\
**Last updated:** [June 14, 2022, 6:26pm UTC](https://discourse.processing.org/t/problem-with-junit-in-a-processing-library/37232 "2022-06-14T18:26:58Z")

</div>

Hello, im making a processing library in java that makes possible to create presentation without limitations. I’m having a lot of problems, first of all i dont know how could i add JUnit to the properties.xml, furthermo…

---

## [Requirements for modes](https://discourse.processing.org/t/requirements-for-modes/37542)

<div class="topic-metadata">

**Author:** [@NumericPrime](https://discourse.processing.org/u/NumericPrime)\
**Replies:** 4\
**Last updated:** [June 14, 2022, 4:49pm UTC](https://discourse.processing.org/t/requirements-for-modes/37542 "2022-06-14T16:49:16Z")

</div>

I’m currently trying to develop a custom mode for processing. However I don’t know what custom modes need to provide in terms of code to work. What classes/methods do I need to provide to get a custom mode to work?

---

## [I need help with arrays](https://discourse.processing.org/t/i-need-help-with-arrays/37381)

<div class="topic-metadata">

**Author:** [@JosepAlqueza](https://discourse.processing.org/u/JosepAlqueza)\
**Replies:** 15\
**Last updated:** [June 14, 2022, 11:46am UTC](https://discourse.processing.org/t/i-need-help-with-arrays/37381 "2022-06-14T11:46:11Z")

</div>

Hello to all! The program will have to calculate the Santiago de Compostela distance (x, y position 490,110) to all cities and save the coordinates and distance from the city further away in the Array distances. Likewis…

---

## [Nesting "Else If"](https://discourse.processing.org/t/nesting-else-if/37521)

<div class="topic-metadata">

**Author:** [@panko](https://discourse.processing.org/u/panko)\
**Replies:** 6\
**Last updated:** [June 14, 2022, 7:18am UTC](https://discourse.processing.org/t/nesting-else-if/37521 "2022-06-14T07:18:05Z")

</div>

Hi there - I’d like to have a variable number of “else if” statements. I wrote the following code, but it gets a bunch of errors (which I copied and pasted below the code. Does anyone know how to do this? Thanks! void…

---

## [Help with arrays!](https://discourse.processing.org/t/help-with-arrays/37329)

<div class="topic-metadata">

**Author:** [@JosepAlqueza](https://discourse.processing.org/u/JosepAlqueza)\
**Replies:** 9\
**Last updated:** [June 8, 2022, 1:38am UTC](https://discourse.processing.org/t/help-with-arrays/37329 "2022-06-08T01:38:08Z")

</div>

Hello to all! I have an array (Cities) where the first column is the X position and the second column is the Y position. Combined they represent the position on a map of a city. The third can be ignored. I need these v…

---

## [Have two questions, one about arrays and one about integers](https://discourse.processing.org/t/have-two-questions-one-about-arrays-and-one-about-integers/37500)

<div class="topic-metadata">

**Author:** [@Mikey83](https://discourse.processing.org/u/Mikey83)\
**Replies:** 9\
**Last updated:** [June 13, 2022, 12:40am UTC](https://discourse.processing.org/t/have-two-questions-one-about-arrays-and-one-about-integers/37500 "2022-06-13T00:40:10Z")

</div>

Hi, im just wondering if there is a quick solution to fill an array, similar to range in python, i usually use a for loop but is there a shorter way? Also, i know the largest possible integer is 2,147,483,647 and long a…

---

## [Can you start a sketch with Arduino button?](https://discourse.processing.org/t/can-you-start-a-sketch-with-arduino-button/37494)

<div class="topic-metadata">

**Author:** [@friedadedoncker](https://discourse.processing.org/u/friedadedoncker)\
**Replies:** 11\
**Last updated:** [June 13, 2022, 12:15am UTC](https://discourse.processing.org/t/can-you-start-a-sketch-with-arduino-button/37494 "2022-06-13T00:15:48Z")

</div>

Hi! I recently purchased this keyswitch. I was wondering if there’s any way to run a sketch (with this switch). What code would I need for this? Something like: if … == 0 once, run file? Thanks!

---

## [Launch() function does not work](https://discourse.processing.org/t/launch-function-does-not-work/37459)

<div class="topic-metadata">

**Author:** [@Logenli](https://discourse.processing.org/u/Logenli)\
**Replies:** 6\
**Last updated:** [June 13, 2022, 12:09am UTC](https://discourse.processing.org/t/launch-function-does-not-work/37459 "2022-06-13T00:09:49Z")

</div>

Objective: I want to activate/run another processing script using controlp5 button. When users click the button, they can trigger the target script. What I have so far: Here is my code: import controlP5.\*; void setu…

---

## [Can I use map () in a loop?](https://discourse.processing.org/t/can-i-use-map-in-a-loop/37511)

<div class="topic-metadata">

**Author:** [@mvb](https://discourse.processing.org/u/mvb)\
**Replies:** 1\
**Last updated:** [June 12, 2022, 11:26pm UTC](https://discourse.processing.org/t/can-i-use-map-in-a-loop/37511 "2022-06-12T23:26:37Z")

</div>

I have a piece of code and I want to use the map() in order to have the last column of the array with values between 5 and 60. 5 will equal to the minimum value and 60 to the maximum, and the numbers in the middle they w…

---

## [How to find a max value with loop](https://discourse.processing.org/t/how-to-find-a-max-value-with-loop/37476)

<div class="topic-metadata">

**Author:** [@mvb](https://discourse.processing.org/u/mvb)\
**Replies:** 12\
**Last updated:** [June 12, 2022, 8:25pm UTC](https://discourse.processing.org/t/how-to-find-a-max-value-with-loop/37476 "2022-06-12T20:25:16Z")

</div>

How do I find the maximum and minimum value of an array with loops?

---

## [Need help on making scene interactive for semester project](https://discourse.processing.org/t/need-help-on-making-scene-interactive-for-semester-project/37461)

<div class="topic-metadata">

**Author:** [@mahnc1](https://discourse.processing.org/u/mahnc1)\
**Replies:** 4\
**Last updated:** [June 12, 2022, 12:52pm UTC](https://discourse.processing.org/t/need-help-on-making-scene-interactive-for-semester-project/37461 "2022-06-12T12:52:48Z")

</div>

Hi, I have recently been writing a paper on how code can be used to solve modern design problems and really want to show off how interactive coding can be. I am extremely interested yet sadly lack the knowledge and exp…

---

## [Program works on Processing editor but not webpage](https://discourse.processing.org/t/program-works-on-processing-editor-but-not-webpage/37412)

<div class="topic-metadata">

**Author:** [@zellwd](https://discourse.processing.org/u/zellwd)\
**Replies:** 1\
**Last updated:** [June 12, 2022, 3:49am UTC](https://discourse.processing.org/t/program-works-on-processing-editor-but-not-webpage/37412 "2022-06-12T03:49:33Z")

</div>

Hi there, I have this .pde program that works perfectly on the Processing software, but when I add it to a webpage it just appears as a black canvas. I already tried converting it to p5.js but it’s just way too complica…

---

## [What value is missing in my JSON parse?](https://discourse.processing.org/t/what-value-is-missing-in-my-json-parse/37483)

<div class="topic-metadata">

**Author:** [@gis667](https://discourse.processing.org/u/gis667)\
**Replies:** 1\
**Last updated:** [June 12, 2022, 1:28am UTC](https://discourse.processing.org/t/what-value-is-missing-in-my-json-parse/37483 "2022-06-12T01:28:18Z")

</div>

I’m working on building two programs, one in Python and one in Processing, to communicate over socket TCP / data stream. 75% is working perfectly: Encoding JSON and sending over socket from Processing Receiving messag…

---

## [Thoughts on my GUI library for using swing](https://discourse.processing.org/t/thoughts-on-my-gui-library-for-using-swing/37268)

<div class="topic-metadata">

**Author:** [@NumericPrime](https://discourse.processing.org/u/NumericPrime)\
**Replies:** 3\
**Last updated:** [June 11, 2022, 4:23pm UTC](https://discourse.processing.org/t/thoughts-on-my-gui-library-for-using-swing/37268 "2022-06-11T16:23:50Z")

</div>

My first library (Swing Helper) is available on the contributions manager now! It is supposed to help with using swing components in processing. Since this is the first time for me to publish a library I don’t know how …

---

## [What parts of the transform get reset in the draw loop? Does the matrix stack get reset?](https://discourse.processing.org/t/what-parts-of-the-transform-get-reset-in-the-draw-loop-does-the-matrix-stack-get-reset/37454)

<div class="topic-metadata">

**Author:** [@LordXerus](https://discourse.processing.org/u/LordXerus)\
**Replies:** 5\
**Last updated:** [June 10, 2022, 10:32pm UTC](https://discourse.processing.org/t/what-parts-of-the-transform-get-reset-in-the-draw-loop-does-the-matrix-stack-get-reset/37454 "2022-06-10T22:32:58Z")

</div>

Asking because this wasn’t clear in the reference. I thought that the entire matrix stack was discarded, but I ran into the cannot push more than 32 time error. Are the translate, rotate, and scale the only things that a…

---

## [Combined arrays position text](https://discourse.processing.org/t/combined-arrays-position-text/37452)

<div class="topic-metadata">

**Author:** [@mvb](https://discourse.processing.org/u/mvb)\
**Replies:** 2\
**Last updated:** [June 10, 2022, 4:24pm UTC](https://discourse.processing.org/t/combined-arrays-position-text/37452 "2022-06-10T16:24:07Z")

</div>

I have a loaded image of a country and an int array with the coordinates and population of each city, and another string array with the names of the cities. I want to combine them and have the names of the cities appea…

---

## [How does Processing Export work?](https://discourse.processing.org/t/how-does-processing-export-work/36816)

<div class="topic-metadata">

**Author:** [@LordXerus](https://discourse.processing.org/u/LordXerus)\
**Replies:** 6\
**Last updated:** [June 10, 2022, 3:17pm UTC](https://discourse.processing.org/t/how-does-processing-export-work/36816 "2022-06-10T15:17:29Z")

</div>

What exactly does the Processing’s Export Application do? I’m working on a project that uses Processing in IntelliJ, and I managed to get it building as a jar file. How do I turn it into a exe?

---

## [Please, help me, really easy question](https://discourse.processing.org/t/please-help-me-really-easy-question/37433)

<div class="topic-metadata">

**Author:** [@Carlos138](https://discourse.processing.org/u/Carlos138)\
**Replies:** 2\
**Last updated:** [June 9, 2022, 8:49pm UTC](https://discourse.processing.org/t/please-help-me-really-easy-question/37433 "2022-06-09T20:49:19Z")

</div>

With this easy code: void setup () { size(500, 500); background(255, 255, 255); } void draw() { if(keyPressed){ if(key=='a'){ rect(20, 20, 50, 50); } } } Why the square didn’t disappear when I stop clic…

---

## [Translate indefinitely in a for loop](https://discourse.processing.org/t/translate-indefinitely-in-a-for-loop/37373)

<div class="topic-metadata">

**Author:** [@yves](https://discourse.processing.org/u/yves)\
**Replies:** 10\
**Last updated:** [June 9, 2022, 3:30pm UTC](https://discourse.processing.org/t/translate-indefinitely-in-a-for-loop/37373 "2022-06-09T15:30:52Z")

</div>

Hi everyone, I try to translate indefinitely a loop of rectangles, but it doesn’t work properly my code : pushMatrix() ; pushStyle(); fill(255); for (float i=0; i \< width; i = i + 100) { for (int x = 0…

---

## [Disable scaling](https://discourse.processing.org/t/disable-scaling/37417)

<div class="topic-metadata">

**Author:** [@luckorloss](https://discourse.processing.org/u/luckorloss)\
**Replies:** 2\
**Last updated:** [June 9, 2022, 10:47am UTC](https://discourse.processing.org/t/disable-scaling/37417 "2022-06-09T10:47:59Z")

</div>

I use 200% scaling on my desktop to be able to read, but it causes the output window to be twice as large. Everything looks super aliased too. Is there a way to disable scaling on the display window?

---

## [Sketch doesn't scale right with size() function](https://discourse.processing.org/t/sketch-doesnt-scale-right-with-size-function/37396)

<div class="topic-metadata">

**Author:** [@karo](https://discourse.processing.org/u/karo)\
**Replies:** 8\
**Last updated:** [June 9, 2022, 10:46am UTC](https://discourse.processing.org/t/sketch-doesnt-scale-right-with-size-function/37396 "2022-06-09T10:46:50Z")

</div>

Hey there, lately i got an new surface 8pro, and i directly wanted to start coding on it as well as on my desktop work station. But there is a problem, because the sketch on the new laptop does not run with the correc…

---

## [Simple Iterative List](https://discourse.processing.org/t/simple-iterative-list/37398)

<div class="topic-metadata">

**Author:** [@panko](https://discourse.processing.org/u/panko)\
**Replies:** 1\
**Last updated:** [June 8, 2022, 7:53am UTC](https://discourse.processing.org/t/simple-iterative-list/37398 "2022-06-08T07:53:41Z")

</div>

Hi there - I am doing something a few times in a row. I feel like there must be a better way to write this. Can anyone help me? Thank you! PShape square1, square2, square3; void setup() { size(300, 300); // Crea…

[Previous page](https://discourse.processing.org/c/processing/6.md?page=75)

[Next page](https://discourse.processing.org/c/processing/6.md?page=77)
