# Electronics (Arduino, etc.)

**URL:** https://discourse.processing.org/c/processing/processing-electronics/25.md?page=6

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

**Page:** 7

---

## [How to stop program immediately?](https://discourse.processing.org/t/how-to-stop-program-immediately/36156)

<div class="topic-metadata">

**Author:** [@Smajdalf](https://discourse.processing.org/u/Smajdalf)\
**Replies:** 3\
**Last updated:** [April 6, 2022, 12:06pm UTC](https://discourse.processing.org/t/how-to-stop-program-immediately/36156 "2022-04-06T12:06:53Z")

</div>

I want to write a simple program that check number of conditions and stop if some of them is wrong. I have everything in setup() and tried to use exit() for this but it does not work. I cannot return() either because set…

---

## [Send variable from arduino to processing: Error while disabling serialEvent () for COM4 null](https://discourse.processing.org/t/send-variable-from-arduino-to-processing-error-while-disabling-serialevent-for-com4-null/13046)

<div class="topic-metadata">

**Author:** [@waffi](https://discourse.processing.org/u/waffi)\
**Replies:** 6\
**Last updated:** [April 4, 2022, 10:12pm UTC](https://discourse.processing.org/t/send-variable-from-arduino-to-processing-error-while-disabling-serialevent-for-com4-null/13046 "2022-04-04T22:12:26Z")

</div>

Hello everybody I try to send variables from the arduino to processing. From time to time processing brings me this error: Error, disabling serialEvent () for COM4 zero I invite scetch again because then arduino, then…

---

## [Xbox Controller + Stepper motors](https://discourse.processing.org/t/xbox-controller-stepper-motors/20818)

<div class="topic-metadata">

**Author:** [@Name\_itT](https://discourse.processing.org/u/Name_itT)\
**Replies:** 25\
**Last updated:** [March 30, 2022, 8:11am UTC](https://discourse.processing.org/t/xbox-controller-stepper-motors/20818 "2022-03-30T08:11:42Z")

</div>

Hello everyone, my name is Taniq, I am from Slovakia, Bratislava.I would like to ask for help. Recently I found a video on youtube, demonstration how to control with Xbox360 servo motors.I was very impressed from the in…

---

## [Why do I get a NullPointerException](https://discourse.processing.org/t/why-do-i-get-a-nullpointerexception/35711)

<div class="topic-metadata">

**Author:** [@LauraDob](https://discourse.processing.org/u/LauraDob)\
**Replies:** 7\
**Last updated:** [March 21, 2022, 3:05pm UTC](https://discourse.processing.org/t/why-do-i-get-a-nullpointerexception/35711 "2022-03-21T15:05:10Z")

</div>

When I run it, I have NullPointerException \[0\] “COM5”… How do I fix it? This is the code import processing.serial.\*; Serial myPort; // Create object from Serial class int val = 0; int oldval = 0; int numFrames = 2; …

---

## [Serial reading values is duplicate during about 0.3s](https://discourse.processing.org/t/serial-reading-values-is-duplicate-during-about-0-3s/35817)

<div class="topic-metadata">

**Author:** [@Ardan](https://discourse.processing.org/u/Ardan)\
**Replies:** 2\
**Last updated:** [March 21, 2022, 12:46am UTC](https://discourse.processing.org/t/serial-reading-values-is-duplicate-during-about-0-3s/35817 "2022-03-21T00:46:04Z")

</div>

HI guys, I’m new to both processing and JAVA. I need to build a serial project to complete my research. I used a Arduino MEGA 2560 and a AD7606 to capture volt signals from 8 channels and the value will be sent to proces…

---

## [Playing picture with Processing column by column on serial line WS2811 in constant time](https://discourse.processing.org/t/playing-picture-with-processing-column-by-column-on-serial-line-ws2811-in-constant-time/35675)

<div class="topic-metadata">

**Author:** [@MachalXVIII](https://discourse.processing.org/u/MachalXVIII)\
**Replies:** 1\
**Last updated:** [March 11, 2022, 4:25pm UTC](https://discourse.processing.org/t/playing-picture-with-processing-column-by-column-on-serial-line-ws2811-in-constant-time/35675 "2022-03-11T16:25:59Z")

</div>

Hello, Iam came here for help as absolute beginner with this SW and almost beginner with microcomputers. I want to start building on this project OctoWS2811 LED Library, Driving Hundreds to Thousands of WS2811 LEDs with…

---

## [Error " java.lang.NoClassDefFoundError: com/sun/jna/Library " whilst using Kinect](https://discourse.processing.org/t/error-java-lang-noclassdeffounderror-com-sun-jna-library-whilst-using-kinect/35663)

<div class="topic-metadata">

**Author:** [@LRO](https://discourse.processing.org/u/LRO)\
**Replies:** 0\
**Last updated:** [March 10, 2022, 2:43pm UTC](https://discourse.processing.org/t/error-java-lang-noclassdeffounderror-com-sun-jna-library-whilst-using-kinect/35663 "2022-03-10T14:43:27Z")

</div>

I am trying to use the Kinect 1414 for the first time with Processing but I am running into this error every time. Can anyone help? I am running on a Mac M1 with Big Sur v11.2 Here’s a similar error I have on one of th…

---

## [What camera, besides Kinect, is best to use with Processing?](https://discourse.processing.org/t/what-camera-besides-kinect-is-best-to-use-with-processing/35557)

<div class="topic-metadata">

**Author:** [@Brooke](https://discourse.processing.org/u/Brooke)\
**Replies:** 2\
**Last updated:** [March 7, 2022, 2:51pm UTC](https://discourse.processing.org/t/what-camera-besides-kinect-is-best-to-use-with-processing/35557 "2022-03-07T14:51:39Z")

</div>

Hello! I’ve spent a long time trying to get sketches working with the xbox Kinect. I’ve tried to install OpenNI, SimpleOpenNI, NITE, libfreenect, Homebrew, and many more. As more of a beginner with this stuff it has beco…

---

## [I am having problems connecting Processing to an Arduino](https://discourse.processing.org/t/i-am-having-problems-connecting-processing-to-an-arduino/35599)

<div class="topic-metadata">

**Author:** [@jimh](https://discourse.processing.org/u/jimh)\
**Replies:** 5\
**Last updated:** [March 7, 2022, 3:11am UTC](https://discourse.processing.org/t/i-am-having-problems-connecting-processing-to-an-arduino/35599 "2022-03-07T03:11:19Z")

</div>

Hello, I need help connecting Processing to my Arduino. I am new to Processing and Arduino. I am running on a Mac and using an Arduino Uno. I don’t know what I am doing… I have used the following code and methods tha…

---

## [How to code button 2](https://discourse.processing.org/t/how-to-code-button-2/35167)

<div class="topic-metadata">

**Author:** [@ata](https://discourse.processing.org/u/ata)\
**Replies:** 2\
**Last updated:** [February 17, 2022, 9:15am UTC](https://discourse.processing.org/t/how-to-code-button-2/35167 "2022-02-17T09:15:44Z")

</div>

i cant manage to code button 2. the 3 is done and it stamps the pshape “v” i have to code button 2 wich should basically do the same as 3 but instead of the “v” pshape should stamp phsape “u” but i dont know how to make…

---

## [Client socket nonsense](https://discourse.processing.org/t/client-socket-nonsense/33635)

<div class="topic-metadata">

**Author:** [@joepekoe](https://discourse.processing.org/u/joepekoe)\
**Replies:** 1\
**Last updated:** [February 11, 2022, 10:37am UTC](https://discourse.processing.org/t/client-socket-nonsense/33635 "2022-02-11T10:37:09Z")

</div>

Processing version: 3.5.4 Client got end-of-stream. Client SocketException: Socket closed Socket exception handling in Processing has proven to be nothing less than frustrating and an annoyance. An electronic chase a…

---

## [Getting data from Home wireless sensors](https://discourse.processing.org/t/getting-data-from-home-wireless-sensors/35063)

<div class="topic-metadata">

**Author:** [@PeterMc](https://discourse.processing.org/u/PeterMc)\
**Replies:** 0\
**Last updated:** [February 9, 2022, 11:01am UTC](https://discourse.processing.org/t/getting-data-from-home-wireless-sensors/35063 "2022-02-09T11:01:35Z")

</div>

has anyone managed to access data from a home sensor like the Ikea motion sensor (or similar)? If so how to you do it?

---

## [Image tracking processing](https://discourse.processing.org/t/image-tracking-processing/34864)

<div class="topic-metadata">

**Author:** [@doni](https://discourse.processing.org/u/doni)\
**Replies:** 21\
**Last updated:** [February 1, 2022, 8:55am UTC](https://discourse.processing.org/t/image-tracking-processing/34864 "2022-02-01T08:55:05Z")

</div>

hi forum. i just combining processing code brightest tracking to send x val to arduino but the servo wont move. this is the code import processing.video.\*; import processing.serial.\*; //import the serial library Captur…

---

## [Date from Arduino in Processing](https://discourse.processing.org/t/date-from-arduino-in-processing/34909)

<div class="topic-metadata">

**Author:** [@musa](https://discourse.processing.org/u/musa)\
**Replies:** 5\
**Last updated:** [January 31, 2022, 7:38pm UTC](https://discourse.processing.org/t/date-from-arduino-in-processing/34909 "2022-01-31T19:38:02Z")

</div>

Hi guys, I want to sent my data ( PPG-ECG wavs) from Arduino uno in Processing and then plot it I tried to write a code for it. that partially worked and now I want to extend it. So instead of plotting the data as poi…

---

## [Stop while (myPort.available() \> 0)](https://discourse.processing.org/t/stop-while-myport-available-0/34825)

<div class="topic-metadata">

**Author:** [@jhsa](https://discourse.processing.org/u/jhsa)\
**Replies:** 4\
**Last updated:** [January 31, 2022, 1:17pm UTC](https://discourse.processing.org/t/stop-while-myport-available-0/34825 "2022-01-31T13:17:16Z")

</div>

Hi, beginner here, so please be gentle :slight\_smile: I am trying to stop a while look if a timer runs out (millis(). But I just cannot find a way of doing it. What I am trying to do is if a certain string is not recei…

---

## [Serial.write(int) only sends the first byte](https://discourse.processing.org/t/serial-write-int-only-sends-the-first-byte/34888)

<div class="topic-metadata">

**Author:** [@RichardDL](https://discourse.processing.org/u/RichardDL)\
**Replies:** 7\
**Last updated:** [January 31, 2022, 11:35am UTC](https://discourse.processing.org/t/serial-write-int-only-sends-the-first-byte/34888 "2022-01-31T11:35:01Z")

</div>

Hi, Following this topic, I made a simple Sketch to write an integer from Processing to Arduino. The help for Serial.write in Processing 3 and 4 are different. P3 (on disk) has “src int: data to write” so it should ac…

---

## [How to packed JSON object over serial port (Serialise JSON object)](https://discourse.processing.org/t/how-to-packed-json-object-over-serial-port-serialise-json-object/34686)

<div class="topic-metadata">

**Author:** [@avong](https://discourse.processing.org/u/avong)\
**Replies:** 5\
**Last updated:** [January 20, 2022, 5:44am UTC](https://discourse.processing.org/t/how-to-packed-json-object-over-serial-port-serialise-json-object/34686 "2022-01-20T05:44:01Z")

</div>

please format code with \</\> button \* homework policy \* asking questions I wish to set PC to communicate with my microcontroller over serial port. The data format i use JSON. The microcontroller to PC is working well …

---

## [Arduino controlled soundfile in Processing](https://discourse.processing.org/t/arduino-controlled-soundfile-in-processing/34564)

<div class="topic-metadata">

**Author:** [@aejstr20](https://discourse.processing.org/u/aejstr20)\
**Replies:** 3\
**Last updated:** [January 15, 2022, 9:27pm UTC](https://discourse.processing.org/t/arduino-controlled-soundfile-in-processing/34564 "2022-01-15T21:27:04Z")

</div>

So, me and my group are trying to control a soundfile in Processing through a potentiometer and sensor data from an Arduino UNO. We’re controlling it’s attributes (specifically pitch) through the beads library. However, …

---

## [How to overlay a map on a radar style display](https://discourse.processing.org/t/how-to-overlay-a-map-on-a-radar-style-display/34498)

<div class="topic-metadata">

**Author:** [@rajiv.tctech](https://discourse.processing.org/u/rajiv.tctech)\
**Replies:** 6\
**Last updated:** [January 14, 2022, 7:24am UTC](https://discourse.processing.org/t/how-to-overlay-a-map-on-a-radar-style-display/34498 "2022-01-14T07:24:15Z")

</div>

I have built a radar simulator and display. The range and azimuth are fed to the Processing program via USB serial. I have a timebase rotating around the screen, following the azimuth being sent to the USB serial. I have…

---

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

<div class="topic-metadata">

**Author:** [@SNIMNS](https://discourse.processing.org/u/SNIMNS)\
**Replies:** 1\
**Last updated:** [January 12, 2022, 8:13pm UTC](https://discourse.processing.org/t/problem-with-values/34578 "2022-01-12T20:13:23Z")

</div>

I have a problem When i put the last if (watch the next code) the program not return others values and stop all How can i solve it? //Istruzioni per la futura connessione con la seriale import processing.serial.\*; Ser…

---

## [Display values of a variable](https://discourse.processing.org/t/display-values-of-a-variable/34556)

<div class="topic-metadata">

**Author:** [@SNIMNS](https://discourse.processing.org/u/SNIMNS)\
**Replies:** 4\
**Last updated:** [January 10, 2022, 3:55pm UTC](https://discourse.processing.org/t/display-values-of-a-variable/34556 "2022-01-10T15:55:30Z")

</div>

Salutations, I have to visualize the values ​​that come from arduino and that are constantly changing. Unfortunately, every time the value changes, this overlaps the previous one, making it difficult to read. This is t…

---

## [Serial communication between Mac and micro:bit](https://discourse.processing.org/t/serial-communication-between-mac-and-micro-bit/34543)

<div class="topic-metadata">

**Author:** [@Vincent\_Fung](https://discourse.processing.org/u/Vincent_Fung)\
**Replies:** 3\
**Last updated:** [January 10, 2022, 4:07am UTC](https://discourse.processing.org/t/serial-communication-between-mac-and-micro-bit/34543 "2022-01-10T04:07:00Z")

</div>

please format code with \</\> button \* homework policy \* asking questions can someone pls guide me to do something similar to this… It seems the highlighted one program is ok for window’s laptop but not for Mac. Wh…

---

## [Processing to Arduino serial](https://discourse.processing.org/t/processing-to-arduino-serial/34382)

<div class="topic-metadata">

**Author:** [@danjy](https://discourse.processing.org/u/danjy)\
**Replies:** 2\
**Last updated:** [January 6, 2022, 10:21pm UTC](https://discourse.processing.org/t/processing-to-arduino-serial/34382 "2022-01-06T22:21:26Z")

</div>

I am trying to send arduino serial commands. I have set up port4 after following some documentation in the sample files. the below code is not working as expected, textfield11 has a float value inside and the arduino c…

---

## [Checking Boolean variable breaks serial communication code with Arduino](https://discourse.processing.org/t/checking-boolean-variable-breaks-serial-communication-code-with-arduino/34149)

<div class="topic-metadata">

**Author:** [@grudovz](https://discourse.processing.org/u/grudovz)\
**Replies:** 3\
**Last updated:** [December 25, 2021, 3:45pm UTC](https://discourse.processing.org/t/checking-boolean-variable-breaks-serial-communication-code-with-arduino/34149 "2021-12-25T15:45:05Z")

</div>

I’m learning how to use processing to communicate via serial with arduino. Using the basic code below works, both variables are getting written to the arduino. And they then get printed to the processing console. (serial…

---

## [Serial connection between Processing and Arduino doesn't work](https://discourse.processing.org/t/serial-connection-between-processing-and-arduino-doesnt-work/34054)

<div class="topic-metadata">

**Author:** [@grudovz](https://discourse.processing.org/u/grudovz)\
**Replies:** 7\
**Last updated:** [December 14, 2021, 1:14pm UTC](https://discourse.processing.org/t/serial-connection-between-processing-and-arduino-doesnt-work/34054 "2021-12-14T13:14:30Z")

</div>

I’m trying to connect an Arduino Nano Every and Processing via serial. I’m getting no errors on either side, and the arduino serial functionality works otherwise on the arduino IDE. I’m connecting on the right port, and…

---

## [Sending Processing canvas to addressable LEDs](https://discourse.processing.org/t/sending-processing-canvas-to-addressable-leds/34050)

<div class="topic-metadata">

**Author:** [@zumdar](https://discourse.processing.org/u/zumdar)\
**Replies:** 6\
**Last updated:** [December 14, 2021, 3:03am UTC](https://discourse.processing.org/t/sending-processing-canvas-to-addressable-leds/34050 "2021-12-14T03:03:13Z")

</div>

I want an easy way to send the processing canvas to addressable LEDs. I know about Fadecandy, but I dont have the hardware for that right now, I just have some Teensy’s and random Arduino’s lying around. I know i could b…

---

## [Looking for help on the motion sensor problems](https://discourse.processing.org/t/looking-for-help-on-the-motion-sensor-problems/34090)

<div class="topic-metadata">

**Author:** [@kathy123td](https://discourse.processing.org/u/kathy123td)\
**Replies:** 2\
**Last updated:** [December 13, 2021, 11:10am UTC](https://discourse.processing.org/t/looking-for-help-on-the-motion-sensor-problems/34090 "2021-12-13T11:10:04Z")

</div>

Hello, I replace a PIR Motion Sensor according to the 6 steps in my phone. I followed the schema reported of product introduction and steps in the posted url, but it does not work, it gives me values not consistent with…

---

## [Using two different readStringUntil "characters"](https://discourse.processing.org/t/using-two-different-readstringuntil-characters/10769)

<div class="topic-metadata">

**Author:** [@eezJerome](https://discourse.processing.org/u/eezJerome)\
**Replies:** 26\
**Last updated:** [December 12, 2021, 11:46am UTC](https://discourse.processing.org/t/using-two-different-readstringuntil-characters/10769 "2021-12-12T11:46:56Z")

</div>

Hello. I am not sure what to call the value inside the bufferUntil, but as my title implies I need to use two different characters, rather than just the newline (\\n). Is it possible that, inside the serialEvent() funct…

---

## [Splitting a string that contains a float value](https://discourse.processing.org/t/splitting-a-string-that-contains-a-float-value/34065)

<div class="topic-metadata">

**Author:** [@F1yin](https://discourse.processing.org/u/F1yin)\
**Replies:** 2\
**Last updated:** [December 11, 2021, 11:41pm UTC](https://discourse.processing.org/t/splitting-a-string-that-contains-a-float-value/34065 "2021-12-11T23:41:54Z")

</div>

Hi! My goal is to use an Arduino to send processing multiple sensor readings and display them. Right now I am sending the values as a comma-separated string, and then plan on displaying each value individually by splitt…

---

## [Serial connection between Arduino and Processing doesn't work; Port busy](https://discourse.processing.org/t/serial-connection-between-arduino-and-processing-doesnt-work-port-busy/34040)

<div class="topic-metadata">

**Author:** [@grudovz](https://discourse.processing.org/u/grudovz)\
**Replies:** 2\
**Last updated:** [December 11, 2021, 12:48pm UTC](https://discourse.processing.org/t/serial-connection-between-arduino-and-processing-doesnt-work-port-busy/34040 "2021-12-11T12:48:09Z")

</div>

Hi everyone. I’m trying to connect arduino and processing via serial. Whenever I run the processing sketch I get the following error: RuntimeException: Error opening serial port COM26: Port busy Could not run the sketch…

[Previous page](https://discourse.processing.org/c/processing/processing-electronics/25.md?page=5)

[Next page](https://discourse.processing.org/c/processing/processing-electronics/25.md?page=7)
