Help Choosing Pins

I know I should do this on a breadboard, but I don't have one, so I skipped that step. The relay needs two digital pins, the dimmer needs a digital pwm pin. Which pins should I use? Just trying to get it right the first time. It's my first Arduino project .....

Well, you're not going to send PWM to a relay control, that will just make it chatter and wear out quickly. They are only rated for so many cycles. Sending it a 500 Hz PWM signal won't give you a good result ...

PWM pins are 3,5,6,9,10,11 on an Uno/Nano/ProMini.

I see the pwm labels, I just didn't know if there was anything else that I should consider when choosing.

Yes, look at the alternate functions for the pins now. It could save you a headache later.

I just need an aurduino wiz to tell me which pins to use:)

If you plan on doing these in your project:
Analog reads: don't use A0 to A5
I2C: don't use A4, A5 (these are connected to SDA, SCL)
SPI: don't use D10 (slave select), D11 (MOSI), D12 (MISO), D13 (SCK)
PWM: 3,5,6,9,10,11
Serial to the PC (downloads, debugging): 0,1
SD card or ethernet card: many use 4 for slave select

Other than that, feel free to choose.

tsperry88:
I just need an aurduino wiz to tell me which pins to use:)

I would rather show you where to look. Just doing what other people say to do, without checking it out for yourself, is a bad habit you should avoid from the start.
https://store.arduino.cc/usa/arduino-uno-rev3
Go to the FAQ tab...

Digital pins, 4 & 7, they are not interrupt or PWM or I2C or SPI or analog input or serial comm pins.
PWM, 9, don't axe me why. :slight_smile:

All the pins on the Uno are PCINT capable for interrupts.

And don't forget this is a digital world, and the analogue pins A0 to A3 are available for digital use. I found it useful to make up a spreadsheet to better understand the pins, and what is available.

tsperry88:
I just need an aurduino wiz to tell me which pins to use:)

So you don't need to know what you're doing? This isn't a learning project?

Here is the Uno Products pages for when you need to look it up::
https://store.arduino.cc/usa/arduino-uno-rev3

Getting started The Getting Started with Arduino Uno page contains all the information you need to configure your board, use the Arduino Software (IDE), and start tinkering with coding and electronics.
From the Tutorials section you can find examples from libraries and built-in sketches as well other useful information to expand your knowledge of the Arduino hardware and software.
Find inspiration for your Uno projects from our tutorial platform Project Hub.

If you follow the path, you will learn how to learn better. Skipping around is how to learn poorly and get ideas like using PWM to drive a relay.

Take time to learn each part of what you would use, a relay is just a special kind of switch that can't stand fast changes for long. When you DO need to send power as Pulse Width Modulation it is time to learn transistors and more specific, MOSFETs and the like which are VERY efficient when fully open or fully closed -- like they were made for PWM or just possibly PWM was made for them!

You don't have to be an expert at anything as long as you know what it is, what it's about and what words to search (or links) to find the details when you need them. You want to build enough literacy to be able to even think about the subject which btw applies to every new subject you would learn, those "terms" are your keys.

To address the pins question --- have you ever heard of Pin Maps?
https://store.arduino.cc/usa/arduino-uno-rev3
There are easier to read examples on the web at many sites.

Thanks everybody for the input. I work in the tech industry, so I appreciate being pushed to learn the why, but unfortunately that usually comes with figuring out why something isn't working the way expected and making the necessary changes. At least that's how I end up learning.... I'll have time for that later, but I need to focus on getting this thing programmed.

You need 2 digital pins? Keep pins 0 and 1 for serial and use pins 2 and 3 just as if you are blinking 2 leds. Use pin 5 for the dimmer.

What isn't working the way it should, and what should it do may be interesting here.

BTW, just what Arduino board are you using or did you roll your own in-house? (It's pretty easy.)

I haven't had a chance to test anything. Just finished up. I used the pins from the sample sketches of each device. I have soldered a lot of harnesses and connectors, but nothing like this. I'm pleased with it, if it works.

Seems to work with the demo sketch.

Nice neat wiring too.
Next post, please use img tags, or the Insert Image button (looks like a little monitor on the menu)

Thanks.

The only monitor looking option I see prompts for an image url. Is that for 3rd party hosting?

After you Attach your image and post the reply, you should be able to Copy the image address, select More:Modify and use the Monitor icon and insert the link you copied.
I don't bother, I just type [ img ]pasteTheLink[ /img ] (leave out the spaces) and Save.
Takes like 15 seconds to do all that after you've done it a few times. And I've done more than a few times!

If you go back and select Edit on one of your posts that has a picture, you can see the path of the original attachment, and the img tags around it.
Looks like some size constraints get added also, I didn't put those in.

The monitor button looks like it adds extra characters to the link also Easier to just type the img tags.
Many (non-Arduino) links get extra stuff added anyway (like 22% something or other) so I use Edit to clean up the links anyway.