I I'm new to arduino I need help

I have two solenoids that needs to be triggered when arduino see's an analog signal. The solenoids are on ditial pwm pins. There is also another thing. I want to put a Potianceometer to adjust the on off state while the input is active. This way I don't have to go into the program to change it.

Thank you all in advance!

And how much do you already know about solenoids, the ones you have?
Wire a solenoid up wrong and it will eat your AVR chip and maybe the board it's on.

There is a Tutorial Example in your IDE called AnalogReadSerial in section 1.Basics that will cover the potentiometer.

You should do both separately before trying them together.


THANK YOU for the response

The Solenoid are 24volt dc which I intend to trigger using a relay

as far as coding It's like trying to learn how to walk I just dont understand.

What kind of relay are you connecting to PWM? A coil relay will burn up. You have SSR's?
I am not one of the people who can help you much there, but there is a lot of info available on the forum.

You can start by making this tutorial example work:

The code for your IDE version is in your IDE under FILE->Examples->1.Basics->AnalogReadSerial.

You only need to wire the Arduino, load the code and run it then see how it works. Then change it to set your relays threshold if that is what you want the pot to do. It might be good to print to serial monitor, then you know the value.

Note how the pot is set up with a drain to ground through a resistor. Without that, you will read 1023. Make sure that your other analog inputs have drains as well.