Triggering response from 3 Solenoids between Processing and Arduino

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.








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:

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


1 Like

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 :slight_smile:

// 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