# Triggering response from 3 Solenoids between Processing and Arduino

**URL:** <https://discourse.processing.org/t/triggering-response-from-3-solenoids-between-processing-and-arduino/15592>\
**Category:** Electronics (Arduino, etc.)\
**Created:** [November 17, 2019, 5:43pm UTC](https://discourse.processing.org/t/triggering-response-from-3-solenoids-between-processing-and-arduino/15592 "2019-11-17T17:43:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rebekah\_tkd](https://avatars.discourse-cdn.com/v4/letter/r/439d5e/32.png) [@rebekah\_tkd](https://discourse.processing.org/u/rebekah_tkd)\
**Post date:** [November 17, 2019, 5:43pm UTC](https://discourse.processing.org/t/triggering-response-from-3-solenoids-between-processing-and-arduino/15592/1 "2019-11-17T17:43:21Z")

</div>

hey guys, I am currently having problems trying to use Processing to tell arduino when to turn solenoids on and off. I am new to this so been struggling to find some help. I created a float array which contains data and I want to use this data to somehow control the speed of 3 solenoids.

 ![Screenshot%20(1212)](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/5/56c9c910e66bcbab739ed14a5c287f2d2c288618.png) !

---

<div class="post-metadata">

**Author:** ![rebekah\_tkd](https://avatars.discourse-cdn.com/v4/letter/r/439d5e/32.png) [@rebekah\_tkd](https://discourse.processing.org/u/rebekah_tkd)\
**Post date:** [November 17, 2019, 5:44pm UTC](https://discourse.processing.org/t/triggering-response-from-3-solenoids-between-processing-and-arduino/15592/2 "2019-11-17T17:44:00Z")

</div>

[Screenshot%20(1213)|690x388](https://discourse.processing.org/uploads/short-url/4sPyRyeEPGkPshAweSAoJQyo2Ci.png)

---

<div class="post-metadata">

**Author:** ![rebekah\_tkd](https://avatars.discourse-cdn.com/v4/letter/r/439d5e/32.png) [@rebekah\_tkd](https://discourse.processing.org/u/rebekah_tkd)\
**Post date:** [November 17, 2019, 5:46pm UTC](https://discourse.processing.org/t/triggering-response-from-3-solenoids-between-processing-and-arduino/15592/3 "2019-11-17T17:46:10Z")

</div>

[Screenshot%20(1214)|690x388](https://discourse.processing.org/uploads/short-url/hnV84RWJOzEOTgC677mtpXl6yjg.png)

---

<div class="post-metadata">

**Author:** ![rebekah\_tkd](https://avatars.discourse-cdn.com/v4/letter/r/439d5e/32.png) [@rebekah\_tkd](https://discourse.processing.org/u/rebekah_tkd)\
**Post date:** [November 17, 2019, 5:46pm UTC](https://discourse.processing.org/t/triggering-response-from-3-solenoids-between-processing-and-arduino/15592/4 "2019-11-17T17:46:50Z")

</div>

[Screenshot%20(1215)|690x388](https://discourse.processing.org/uploads/short-url/5tG5S8tanC1CIr0XVZMs0x7jqL6.png)

---

<div class="post-metadata">

**Author:** ![rebekah\_tkd](https://avatars.discourse-cdn.com/v4/letter/r/439d5e/32.png) [@rebekah\_tkd](https://discourse.processing.org/u/rebekah_tkd)\
**Post date:** [November 17, 2019, 5:48pm UTC](https://discourse.processing.org/t/triggering-response-from-3-solenoids-between-processing-and-arduino/15592/5 "2019-11-17T17:48:05Z")

</div>

[Screenshot%20(1216)|690x388](https://discourse.processing.org/uploads/short-url/A2AxEyi1YfuxOqSwEtcbW8hHXkP.png)

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [November 17, 2019, 6:20pm UTC](https://discourse.processing.org/t/triggering-response-from-3-solenoids-between-processing-and-arduino/15592/6 "2019-11-17T18:20:17Z")

</div>

Hello!

> **[delay() / Reference](https://processing.org/reference/delay_.html)**
>
> The delay() function causes the program to halt for a specified time. Delay times are specified in thousandths of a second. For example, running delay(3000) will stop the program for thr…

states:

> The **delay()** function should only be used for pausing scripts (i.e. a script that needs to pause a few seconds before attempting a download, or a sketch that needs to wait a few milliseconds before reading from the serial port.

I will not look at pictures of code.  
Please try to post some minimal code to reflect where you have questions or need help.

This is an Arduino reference:  
[https://www.norwegiancreations.com/2017/09/arduino-tutorial-using-millis-instead-of-delay/](https://www.norwegiancreations.com/2017/09/arduino-tutorial-using-millis-instead-of-delay/)

You can do similar for Processing; a search will come up with many hits on this subject.

🙂

---

<div class="post-metadata">

**Author:** ![Tiemen](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tiemen/32/5477_2.png) [@Tiemen](https://discourse.processing.org/u/Tiemen)\
**Post date:** [November 17, 2019, 6:23pm UTC](https://discourse.processing.org/t/triggering-response-from-3-solenoids-between-processing-and-arduino/15592/7 "2019-11-17T18:23:26Z")

</div>

Hey there Rebekah, welcome to the forum.

It’s possible to post code as text, so we can easily copy-paste it and play around with it. Click the `< /> Preformattted text` button in your post and paste your code in there 🙂

```auto
// the outcome should look something like this

float[] recycling = {43.1, 18.7, 32.1}
int value;

void setup() {
  // your code
}

void draw() {
  // your code
}

```
