# Coding Questions

**URL:** https://discourse.processing.org/c/p5js/p5js-questions/18.md?page=54

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

**Page:** 55

---

## [How to create p5 image from local user file?](https://discourse.processing.org/t/how-to-create-p5-image-from-local-user-file/1165)

<div class="topic-metadata">

**Author:** [@colin](https://discourse.processing.org/u/colin)\
**Replies:** 1\
**Last updated:** [June 22, 2018, 5:07pm UTC](https://discourse.processing.org/t/how-to-create-p5-image-from-local-user-file/1165 "2018-06-22T17:07:16Z")

</div>

Hi there, I’m working on a drag and drop p5 sketch, and it isn’t working so well. So far I managed to make the drag and drop function, but I cant’ manage to transform the image it get into p5.image objet. Anyone knows…

---

## [Drag and drop local files into p5 skecthes](https://discourse.processing.org/t/drag-and-drop-local-files-into-p5-skecthes/1144)

<div class="topic-metadata">

**Author:** [@colin](https://discourse.processing.org/u/colin)\
**Replies:** 9\
**Last updated:** [June 22, 2018, 8:48am UTC](https://discourse.processing.org/t/drag-and-drop-local-files-into-p5-skecthes/1144 "2018-06-22T08:48:34Z")

</div>

Hi, I have a quick question. I would allow my sketch’s users to drag and drop an image file into the program window, and then use it. I can’t find any function for that in p5.js. What would be the easiest way to do that…

---

## [Analysing image file make my browser stop working](https://discourse.processing.org/t/analysing-image-file-make-my-browser-stop-working/893)

<div class="topic-metadata">

**Author:** [@colin](https://discourse.processing.org/u/colin)\
**Replies:** 3\
**Last updated:** [June 21, 2018, 5:40am UTC](https://discourse.processing.org/t/analysing-image-file-make-my-browser-stop-working/893 "2018-06-21T05:40:03Z")

</div>

Hi, I’m making a sketch that load an image, rotate it a bit and display it. The program works well on my code editor, but it is not working on my browser. I first though there were some infinite loop, but after few res…

---

## [Program crashes?](https://discourse.processing.org/t/program-crashes/1140)

<div class="topic-metadata">

**Author:** [@Grimtin10](https://discourse.processing.org/u/Grimtin10)\
**Replies:** 4\
**Last updated:** [June 21, 2018, 3:32am UTC](https://discourse.processing.org/t/program-crashes/1140 "2018-06-21T03:32:43Z")

</div>

Why does this program freeze? https://pastebin.com/VwKiqanB Please help! I’ve been trying to fix it, but no avail. -Grim

---

## [P5js (function) is not defined](https://discourse.processing.org/t/p5js-function-is-not-defined/1114)

<div class="topic-metadata">

**Author:** [@Grimtin10](https://discourse.processing.org/u/Grimtin10)\
**Replies:** 9\
**Last updated:** [June 20, 2018, 8:51am UTC](https://discourse.processing.org/t/p5js-function-is-not-defined/1114 "2018-06-20T08:51:07Z")

</div>

I’m having problems with this, and I don’t know what it means. Any help? -Grim

---

## [directionaLight() doesn't have any effect on my p5.js skecth](https://discourse.processing.org/t/directionalight-doesnt-have-any-effect-on-my-p5-js-skecth/1059)

<div class="topic-metadata">

**Author:** [@colin](https://discourse.processing.org/u/colin)\
**Replies:** 3\
**Last updated:** [June 18, 2018, 8:21pm UTC](https://discourse.processing.org/t/directionalight-doesnt-have-any-effect-on-my-p5-js-skecth/1059 "2018-06-18T20:21:06Z")

</div>

Hi everyone. I’m working on a 3D maze game in p5.js. Everything is working well so far, except the lights, and I can’t figure why :confused: For some reason I am unable to use directionalLight() or pointLight(), only …

---

## [Http authentication](https://discourse.processing.org/t/http-authentication/828)

<div class="topic-metadata">

**Author:** [@stanleyseow](https://discourse.processing.org/u/stanleyseow)\
**Replies:** 4\
**Last updated:** [June 12, 2018, 9:25am UTC](https://discourse.processing.org/t/http-authentication/828 "2018-06-12T09:25:12Z")

</div>

I tried to use the httpDo() with the following code for basic authentication but it is not working, can someone advise on this ? I got a “Failed to load resource: the server responded with a status of 401 (Unauthorized)…

---

## [Arduino LED Hello World](https://discourse.processing.org/t/arduino-led-hello-world/819)

<div class="topic-metadata">

**Author:** [@Onsgaannoubraai](https://discourse.processing.org/u/Onsgaannoubraai)\
**Replies:** 0\
**Last updated:** [June 9, 2018, 10:01pm UTC](https://discourse.processing.org/t/arduino-led-hello-world/819 "2018-06-09T22:01:22Z")

</div>

Beginner to P5js and Arduinos. Trying to setup a LED on the Arduino (windows machine + dont have a rgb LED) to blink on arrow key press for the Hello World setup. Using the example files I have commented in the LED on …

---

## [Trying to load an array from a JSON](https://discourse.processing.org/t/trying-to-load-an-array-from-a-json/685)

<div class="topic-metadata">

**Author:** [@Red\_Hen](https://discourse.processing.org/u/Red_Hen)\
**Replies:** 3\
**Last updated:** [June 9, 2018, 10:21am UTC](https://discourse.processing.org/t/trying-to-load-an-array-from-a-json/685 "2018-06-09T10:21:36Z")

</div>

Hello! So, I’m trying to get data from a JSON file, where the data was saved as an array. But when I try to retrieve discrete values, they come back as ‘undefined’. Can you help? What am I doing wrong? let locJ = 'des…

---

## [Trying to make an image disappear after clicking it p5](https://discourse.processing.org/t/trying-to-make-an-image-disappear-after-clicking-it-p5/627)

<div class="topic-metadata">

**Author:** [@rimai](https://discourse.processing.org/u/rimai)\
**Replies:** 7\
**Last updated:** [June 3, 2018, 1:51pm UTC](https://discourse.processing.org/t/trying-to-make-an-image-disappear-after-clicking-it-p5/627 "2018-06-03T13:51:20Z")

</div>

So I have very beginner knowledge with code, and am trying to make a ‘forest’ scene where the user can click on 5 little blobs of slime mould, and once they click on them they disappear. Right now the 5 blobs of slime m…

---

## [Controlling CSS values with mouse in p5.js](https://discourse.processing.org/t/controlling-css-values-with-mouse-in-p5-js/156)

<div class="topic-metadata">

**Author:** [@AndreasRef](https://discourse.processing.org/u/AndreasRef)\
**Replies:** 7\
**Last updated:** [May 31, 2018, 7:50pm UTC](https://discourse.processing.org/t/controlling-css-values-with-mouse-in-p5-js/156 "2018-05-31T19:50:08Z")

</div>

Hi I have a question about controlling css values with p5.js - for instance setting them according to some interactive input like mouse position. If I have a (variable) font with css settings I can set using css like …

---

## [Cannot execute Force Directed Graph](https://discourse.processing.org/t/cannot-execute-force-directed-graph/394)

<div class="topic-metadata">

**Author:** [@shan](https://discourse.processing.org/u/shan)\
**Replies:** 10\
**Last updated:** [May 30, 2018, 12:33am UTC](https://discourse.processing.org/t/cannot-execute-force-directed-graph/394 "2018-05-30T00:33:26Z")

</div>

i have make coding but cannot execute what is the issues. // # Force Directed Graph var VerletPhysics2D = toxi.physics2d.VerletPhysics2D, VerletParticle2D = toxi.physics2d.VerletParticle2D, VerletSpring2D = tox…

---

## [Pushing a 7712x960 Binary image to p5.js is Super slow. Is there a better way?](https://discourse.processing.org/t/pushing-a-7712x960-binary-image-to-p5-js-is-super-slow-is-there-a-better-way/371)

<div class="topic-metadata">

**Author:** [@Rosaku](https://discourse.processing.org/u/Rosaku)\
**Replies:** 14\
**Last updated:** [May 29, 2018, 5:00am UTC](https://discourse.processing.org/t/pushing-a-7712x960-binary-image-to-p5-js-is-super-slow-is-there-a-better-way/371 "2018-05-29T05:00:49Z")

</div>

Hi, first of all this is my first post, so go easy on me if i am posting in the wrong place :slight\_smile: So what i am trying to do is render an image that is stored as a raw byte array. I am able to do that but its SU…

---

## [Get frequency value](https://discourse.processing.org/t/get-frequency-value/73)

<div class="topic-metadata">

**Author:** [@Strimply](https://discourse.processing.org/u/Strimply)\
**Replies:** 2\
**Last updated:** [May 18, 2018, 10:02pm UTC](https://discourse.processing.org/t/get-frequency-value/73 "2018-05-18T22:02:00Z")

</div>

I’m an italian student, and I’m using p5’s libraries to create a web guitar tuner. I would like to know if there is a way to get the frequency of the microphone input. Thanks

[Previous page](https://discourse.processing.org/c/p5js/p5js-questions/18.md?page=53)
