Questions tagged [pins]

"Pins" are like gateways between the Arduino code running on the chip and the components attached to Arduino. It can refer either to the physical connectors on the board, or it can refer to the pins defined in the code.

"Pins" are like gateways between the Arduino code running on the chip and the components attached to Arduino. It can refer either to the physical connectors on the board, or it can refer to the pins defined in the code.

There are three main types of pins:

  • A digital pin is one that can detect and output a digital signal (i.e. either HIGH or LOW)
  • An analog pin works mostly like a digital pin, except that each one of them also includes an ADC (analogue to digital converter) which can give the Arduino values of 0 to 1024 that is proportional to the input voltage (i.e. 2.5V on a 5V board is 512).
  • A PWM pin (pulse width modulation) is a digital pin that can create a signals that goes on and off very fast. This can be used to create a dimming effect. For more questions related to PWM, see .

A pin can also refer to the physical pin header that you connect wires to. Connect the wire to the GND pin.

Arduino Uno

From http://arduino.cc/en/Main/ArduinoBoardUno

In the photo above, there are 14 digital pins (six of those are PWM), 6 analog pins, and 12 other pins (GND, 5V, 3.3V, etc.).

486 questions
65
votes
13 answers

Is there a way to have more than 14 Output pins on arduino?

Is it possible to have more than 14 output pins on the Arduino, I am working on a project in which I need to light up several LEDs individually. I only have an Arduino Uno, and I don't want to get a Mega.
JVarhol
  • 1,903
  • 2
  • 17
  • 22
35
votes
3 answers

What are the AREF, IOREF, and the unlabeled pin next to IOREF on the Uno R3?

There are some pins on the Arduino which I haven't been able to find out anything about: IOREF AREF An unlabeled one next to IOREF What are they?
tbodt
  • 453
  • 1
  • 6
  • 8
28
votes
12 answers

What type of connector does the GROVE system use?

What type of connector does GROVE use? I'm interested in wiring some old sensors so they're compatible with GROVE, so I first need to identify the connector so I can buy the housing and pins to crimp. It looks to be some type of JST connector, but…
Cerin
  • 1,688
  • 2
  • 28
  • 45
26
votes
3 answers

NodeMCU - Vin pin as 5V output?

I know that Vin can be used to power the board but have also been reading that it can be used as a 5V output. Is it possible to assign Vin as an output as I would any other GPIO? If I want to power an LED from GPIO 12, I would assign GPIO: const int…
acpilot
  • 653
  • 3
  • 13
  • 26
26
votes
3 answers

What happens to the Arduino if you don't use a resistor with an LED?

Making a blinking light seems to be one of the most common beginner projects with Arduino. A typical approach is to connect an LED + resistor (in series) to an IO pin, and connect the other end to ground. In code, you make the pin an output, and…
Peter Bloomfield
  • 10,982
  • 9
  • 48
  • 87
23
votes
2 answers

Why can't I upload a sketch while other components/devices are connected to my Uno?

I wanted to make a fairly simple circuit which would flash a series of LEDs in sequence, using my Arduino Uno (more specifically, a SainSmart clone). I wrote my sketch and it compiled fine. After that, I connected 8 LEDS+resistors to pins 0 through…
Peter Bloomfield
  • 10,982
  • 9
  • 48
  • 87
22
votes
2 answers

Is there a limit on how much current a pin can sink?

I've been experimenting with an 8x8 LED matrix controlled by an Arduino Uno. As I think is typical, the matrix uses a common anode for each row, and a common cathode for each column. At the moment, I've got all the matrix pins connected directly to…
Peter Bloomfield
  • 10,982
  • 9
  • 48
  • 87
22
votes
3 answers

Can a function be called automatically when an input changes?

Currently, my sketch is checking an input pin every time round the main loop. If it detects a change, it calls a custom function to respond to it. Here's the code (trimmed down to the essentials): int pinValue = LOW; void pinChanged() { …
Peter Bloomfield
  • 10,982
  • 9
  • 48
  • 87
21
votes
4 answers

How can higher current devices (motors, solenoids, lights, etc.) be controlled by an Arduino?

I'm looking for a broadly applicable solution, one that can be adapted to a variety of projects. I'm currently working on several projects that each require controlling devices ranging from 800mA to 2A from an Arduino Uno. One controls stepper…
jlbnjmn
  • 978
  • 2
  • 9
  • 15
18
votes
2 answers

Should all unused analog input ports be tied to ground for accurate A2D measurements?

I am using the A0 port on my Arduino Uno to read the voltage output from an LM35 temperature sensor. I observed that the reading fluctuates a lot if I leave the remaining analog input ports A1 to A5 floating. Would floating analog inputs affect the…
anon
17
votes
3 answers

Use all pins as digital I/O

Increase the number of digital pins There are many posts that explain how to use more than just the standard pins on the various Arduinos, but none of them properly explain the limitations and problems. Arduino Uno: 1. You can use the analog…
cocco
  • 451
  • 5
  • 7
  • 16
16
votes
1 answer

What is an ICSP pin?

What is an ICSP pin? I have read that it is an AVR and a tiny programming header for the Arduino, but what is an AVR and what does an ICSP pin do?
SpaceMonk
  • 363
  • 2
  • 4
  • 8
14
votes
5 answers

NodeMCU - use flash button as input in loop()

I couldn't find a proper answer on the net so I came here as a last resort. So I want to use the FLASH button as an input in the loop() method. Is there a way the check if it's pressed or not?
sOnt
  • 145
  • 1
  • 1
  • 8
12
votes
3 answers

ATMega328P-PU and 328P-AU

im planing to make my very own arduino design based on the Arduino PRO mini. I picked this board instead of the UNO mostly because it's way more simpler compared with the UNO since the USB-to-Serial part is missing. As many of you know the MINI uses…
Meletis Flevarakis
  • 382
  • 1
  • 3
  • 12
11
votes
3 answers

Why are the pin numbers of the diagrams and of the code different?

If I search Google for "arduino nano pin numbers", all results show that the pin number of D2 is 5. But that did not work. I searched for some sample codes, and they were 3 for D3 and 5 for D5, etc. So, in codes, the pin number for Dn is n. Then…
Damn Vegetables
  • 357
  • 1
  • 3
  • 9
1
2 3
32 33