# Latest

**URL:** https://discourse.processing.org/latest.md?no_subcategories=false&page=129

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

**Page:** 130

---

## [Callback function arguments](https://discourse.processing.org/t/callback-function-arguments/37588)

<div class="topic-metadata">

**Author:** [@davidhurwich](https://discourse.processing.org/u/davidhurwich)\
**Replies:** 2\
**Last updated:** [June 17, 2022, 8:00pm UTC](https://discourse.processing.org/t/callback-function-arguments/37588 "2022-06-17T20:00:56Z")

</div>

Hi, question about attaching event callback functions to an object in P5. Can those callback functions take arguments? for instance could I do something like this: obj.mousePressed( function(argument)); ?

---

## [P5.js web editor doesn't like private fields](https://discourse.processing.org/t/p5-js-web-editor-doesnt-like-private-fields/37430)

<div class="topic-metadata">

**Author:** [@fabiopettinati](https://discourse.processing.org/u/fabiopettinati)\
**Replies:** 3\
**Last updated:** [June 17, 2022, 3:30pm UTC](https://discourse.processing.org/t/p5-js-web-editor-doesnt-like-private-fields/37430 "2022-06-17T15:30:52Z")

</div>

The example code at Private fields works as expected but the editor complains visually upon encountering a # symbol… the rest of the line is highlighted in red. Is there a directive I could insert to prevent the lint fu…

---

## [OpenCV 4 Upgrade](https://discourse.processing.org/t/opencv-4-upgrade/27640)

<div class="topic-metadata">

**Author:** [@cansik](https://discourse.processing.org/u/cansik)\
**Replies:** 1\
**Last updated:** [June 17, 2022, 3:25pm UTC](https://discourse.processing.org/t/opencv-4-upgrade/27640 "2022-06-17T15:25:20Z")

</div>

I just recently upgraded OpenCV for Processing to version 4.4.0. It uses the pre-compiled binaries provided by the javacpp project and thus supports every major operating system as well as armhf & arm64. All the example…

---

## [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…

---

## [\[TUTORIAL\]Running Python Mode in VScode](https://discourse.processing.org/t/tutorial-running-python-mode-in-vscode/7716)

<div class="topic-metadata">

**Author:** [@fenjalien](https://discourse.processing.org/u/fenjalien)\
**Replies:** 24\
**Last updated:** [June 16, 2022, 7:42pm UTC](https://discourse.processing.org/t/tutorial-running-python-mode-in-vscode/7716 "2022-06-16T19:42:49Z")

</div>

This is the method that I used to get processing.py sketches to run in VScode. You will need: Java to be installed and added to path The file processing-py.jar The Code runner extension To get the first two items re…

---

## [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…

---

## [Custom shape creates negative space when overlapping itself in WebGL mode](https://discourse.processing.org/t/custom-shape-creates-negative-space-when-overlapping-itself-in-webgl-mode/37262)

<div class="topic-metadata">

**Author:** [@neel](https://discourse.processing.org/u/neel)\
**Replies:** 1\
**Last updated:** [June 15, 2022, 11:22pm UTC](https://discourse.processing.org/t/custom-shape-creates-negative-space-when-overlapping-itself-in-webgl-mode/37262 "2022-06-15T23:22:46Z")

</div>

I’ve got a script that I’m trying to port from 2d mode to webgl mode, but the shapes are not behaving as expected. The following isn’t my script, but it’s a demonstration of the problem I run into. When I create a custom…

---

## [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…

---

## [How to read the value of each sensor from the Arduino](https://discourse.processing.org/t/how-to-read-the-value-of-each-sensor-from-the-arduino/36914)

<div class="topic-metadata">

**Author:** [@The-NUll](https://discourse.processing.org/u/The-NUll)\
**Replies:** 8\
**Last updated:** [June 15, 2022, 3:59pm UTC](https://discourse.processing.org/t/how-to-read-the-value-of-each-sensor-from-the-arduino/36914 "2022-06-15T15:59:37Z")

</div>

Hi, I’m new to Arduino and Processing.py. I am using Processing and Arduino to complete my graduation project.(English is not my native language, sometimes I speak it’s very strange.) I want to implement the Serial lib…

---

## [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 …

---

## [Callback function argument](https://discourse.processing.org/t/callback-function-argument/37553)

<div class="topic-metadata">

**Author:** [@davidhurwich](https://discourse.processing.org/u/davidhurwich)\
**Replies:** 1\
**Last updated:** [June 15, 2022, 5:08am UTC](https://discourse.processing.org/t/callback-function-argument/37553 "2022-06-15T05:08:14Z")

</div>

I am writing a program that connects P5 with the HTML DOM. I want to have a HTML button when pressed pass along an argument to a function I created. I know I can add an event and callback function to a variable. I am won…

---

## [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?

---

## [Compile Error in Java Program?](https://discourse.processing.org/t/compile-error-in-java-program/37533)

<div class="topic-metadata">

**Author:** [@shivambhatele](https://discourse.processing.org/u/shivambhatele)\
**Replies:** 1\
**Last updated:** [June 14, 2022, 12:26pm UTC](https://discourse.processing.org/t/compile-error-in-java-program/37533 "2022-06-14T12:26:40Z")

</div>

Hello All, I’ve recently faced some issues… I’ve been following some online tutorials and added the code from given source, I modify it a little, and it doesn’t work. First Java code which compiles on Interviewbit compi…

---

## [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…

---

## [Read Serial Value (From Arduino)](https://discourse.processing.org/t/read-serial-value-from-arduino/5829)

<div class="topic-metadata">

**Author:** [@KeirMeDear](https://discourse.processing.org/u/KeirMeDear)\
**Replies:** 2\
**Last updated:** [June 11, 2022, 9:11pm UTC](https://discourse.processing.org/t/read-serial-value-from-arduino/5829 "2022-06-11T21:11:44Z")

</div>

Hey, so all I’m trying to do is use processing to read a value from the Serial port of an arduino. I have already connected I just don’t know the correct python method to read the value. Current code: def setup(): …

---

## [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?

---

## [Help with Input Text Boxes and Arrays](https://discourse.processing.org/t/help-with-input-text-boxes-and-arrays/37456)

<div class="topic-metadata">

**Author:** [@Chigoz](https://discourse.processing.org/u/Chigoz)\
**Replies:** 2\
**Last updated:** [June 12, 2022, 1:33pm UTC](https://discourse.processing.org/t/help-with-input-text-boxes-and-arrays/37456 "2022-06-12T13:33:11Z")

</div>

Hi guys, please I need your help. I developed this app but it is not working as intended. If a set of values are imputed and one calculation is performed, a result is gotten, but if I edit the values in the text box and …

---

## [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…

---

## [How to delay a display Python Processing](https://discourse.processing.org/t/how-to-delay-a-display-python-processing/37438)

<div class="topic-metadata">

**Author:** [@Daniel11](https://discourse.processing.org/u/Daniel11)\
**Replies:** 1\
**Last updated:** [June 12, 2022, 7:37am UTC](https://discourse.processing.org/t/how-to-delay-a-display-python-processing/37438 "2022-06-12T07:37:43Z")

</div>

Hi all, I am currently wring a code to solve a Rubik’s cube and I am at the stage of animating the turns. I have managed to do it, however it happens to quickly to see. I have tried to put a delay in but where ever I put…

[Previous page](https://discourse.processing.org/latest.md?no_subcategories=false&page=128)

[Next page](https://discourse.processing.org/latest.md?no_subcategories=false&page=130)
