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.

Filter by
Sorted by
Tagged with
58
votes
13answers
65k views

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 ...
33
votes
2answers
57k views

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?
25
votes
3answers
5k views

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 ...
22
votes
3answers
6k views

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): ...
21
votes
3answers
120k views

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 ...
21
votes
2answers
9k views

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,...
20
votes
2answers
33k views

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, ...
19
votes
4answers
8k views

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 ...
18
votes
2answers
5k views

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 ...
15
votes
12answers
19k views

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....
14
votes
1answer
44k views

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?
12
votes
3answers
8k views

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 ...
12
votes
3answers
95k views

Use all pins As digital I/O

Increase the number of digital pins There are many post that explain how to use more than just the standard pins on the various arduinos but none of them explain the limitations and the proplems ...
11
votes
5answers
25k views

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?
11
votes
2answers
2k views

What is the purpose of the I/O pin capacitor on the AVR microcontroller?

What is the purpose of the capacitor on the I/O pins on the ATmega328 (I imagine it's on other AVR microcontrollers as well)? Is it to reduce noise from other parts of the microcontroller?
11
votes
3answers
96k views

Why is my LCD 16*2 is not displaying any characters, although all the wiring is correct?

Recently I have linked up a typical 16*2 LCD (Liquid Crystal Display) display to my Arduino Uno and have linked all the pins up. Here is my connection:(LCD pin first) 1=GND, 2=+5v, 4=11, 6=12, 11=5, ...
11
votes
2answers
21k views

3.3V, 5V and 9V pins on Arduino

On my Arduino Uno R3 and Arduino Mega R3, there are 5V and 3.3V pins. However on this page Introduction to the Arduino Board, there is a 5V and 9V pin but no 3.3V pin. The page at Arduino: What ...
10
votes
4answers
514 views

What is the proper way to make library pin mappings configurable?

I am working with some libraries that provide APIs for interacting with specific hardware chips (that makes these drivers?). However, different custom boards or shields will have the chip mapped to ...
10
votes
4answers
9k views

Arduino motor shield orange/white pin usage

I have an Arduino motor shield like this one plugged into my Mega board. I would like to know some more information about the orange and white pin blocks on the board. The Arduino website has the ...
10
votes
1answer
28k views

A digital I/O pin as ground

I want an I/O pin to return current in a circuit, similarly to the function of ground. Which of these will achieve what I require? pinMode(pinnumber, OUTPUT) digitalWrite(pinnumber, LOW) or ...
9
votes
1answer
3k views

How can a 5v Uno talk to a 3.3v Due?

I currently have an Uno (which operates at 5v), and I'm looking at buying a Due (which only operates at 3.3v). I'd like to make them communicate via Serial or SPI or similar, but presumably connecting ...
9
votes
1answer
2k views

How can the Arduino Uno support up to 12 servos if it only has 6 digital PWM pins?

According to this: The Servo library supports up to 12 motors on most Arduino boards and 48 on the Arduino Mega. On boards other than the Mega, use of the library disables analogWrite() (PWM) ...
8
votes
3answers
7k views

How to read pinMode for digital pin?

Is there a way for me to read the pin mode for one of the digital pins on Arduino? In other words, can I determine whether a pin's been set to an input or output?
8
votes
2answers
20k views

Why does an Arduino UNO need two GND ports?

I have really bad eyesight, so whenever I plug in the power wire and the GND wire I always double check if I'm actually plugging in to the power port not one of the two GND ports. Why does an ...
8
votes
1answer
5k views

What are the SVG pins for on the SainSmart Uno clone?

I bought a SainSmart clone board which is compatible with the Arduino Uno R3. Alongside each of the standard IO pins, there is a row of 3 additional pins (male). They are arranged in columns, marked S,...
7
votes
2answers
5k views

Male header pins on Arduino Uno

On my board, there are 12 (2 groups of 6, each group consistent of 3 rows of 2 pins) weird male header pins. What are these, and how would you use them?
7
votes
1answer
3k views

Pin 13 fires relay when powering on... How to disable?

Pin 13 fires relay when powering on... How to disable? I'm using pro mini 5v 16MHz and a DC 12V 2 Channel Relay Module Optocoupler. The relay Jd-VCC is powered by a 12V and it's VCC is 5V (the same as ...
7
votes
3answers
9k views

How can I detect a disconnected pin?

I'm trying to build a system where if a cable gets disconnected from a pin (any pin), an action is executed. I am wondering how to set this up. Can I simply wire the 5V to a pin and read its status ...
7
votes
2answers
16k views

Use LoLin V3 pins starting with 'S' in Arduino

I have this LoLin NodeMcu V3 board: What are the pins S3, S2, S1, SC, S0, SK? Can I use them as GPIO in Arduino? Thank you for your help!
7
votes
1answer
1k views

Playing audio files with sine wave from arduino

So, when searching for a way to play audio files through the Arduino, I came across this site: How to play WAV audio files with Arduino Uno and MicroSD card This seems like a really good library (...
6
votes
3answers
12k views

How can I filter out noise from ADC lines without delay or signal change?

I'm working on a project with a joystick and I'm trying to keep everything a simple and low latency as possible. I am reading the pots with the onboard 10bit ADC on the ATmega 32u4 but may be ...
6
votes
5answers
1k views

Adding an LCD to Uno but not enough pins left

I am an absolute beginner and wanted to build a simple home automation system using DTMF module using this guide. My problem is out of 12 pins most of them are getting used in DTMF module(5) and the ...
6
votes
1answer
7k views

Difference between PWM and regular output port for servos?

I have been controlling my servomotors for a while now only using pin 0. After some research, it has became apparent to me that the ports with ~ are the PWM pins. I thought that all pins sent out ...
6
votes
1answer
763 views

Arduino Digital Input Causing Output Problems

I am working on a simple project using an Arduino Mega 2560 that involves reading a 12-bit binary encoder signal and which is used to cycle a digital pin high and low (depending on the angular ...
6
votes
5answers
10k views

Simultanous read and read/write on two serial connections

At the moment I'm using two softserials to connect to a GPS and an GSM module. It seems not possible to have two open software-serials. So I was looking for an solution After the initial-setup, the ...
5
votes
3answers
10k views

What to do with Arduino floating pins?

I have some unused pins, should I connect them together and to the ground or leave them floating?
5
votes
5answers
1k views

Is it possible to make normal pins act like ground pins?

So what exactly I am trying to do is control a motor and be able to turn it both ways without any extra parts. So if the hmp was on (the plus pole) and the hmm (the minus pole) acted like ground the ...
5
votes
3answers
2k views

Why does my sketch report too many button presses?

I've been using a button to interact with a sketch (on my Uno), and it's mostly working fine. However, sometimes it seems to be detecting multiple presses when it's only pressed once. It's a small ...
5
votes
3answers
2k views

How to get number of available pins in code?

Different boards have different number of pins. Is there a way to know this number in code (at least digital and analog pins), or do I have to determine board type (like in this thread) and know the ...
5
votes
3answers
267 views

How do I create a 9 bit number based on values from 9 digital inputs?

I have 9 pins that are inputs from 9 IR LEDs. I want to combine all their results into one 9 bit number. example: pin1 = high, pin2 = high, pin3 = high, pin4 = low, pin5 = high, pin6 = low, pin7 = ...
5
votes
1answer
2k views

Use LED on pin 13 again after using the SD library

The question in short: On an Arduino UNO or Nano using the SD library, is it somehow possible to use the LED on pin 13 (or any other pin that is used by the library) again after finishing all SD ...
5
votes
4answers
6k views

Read OUTPUT pin value in Arduino Due

I am trying to read the value of an output pin. online forums say that digitalRead(pinNum); should work, but that is not the case here. digitalRead always returns 0 (LOW). This is the code: int pin = ...
5
votes
3answers
935 views

Fool Proofing My Arduino IC Checker [closed]

I am creating an IC checker for some high school juniors since a faulty IC can be a nuisance of a bug to find when bread-boarding. These ICs are all simple TTL gating from the 74LS series; the set I ...
5
votes
2answers
18k views

Do I need to supply the 12V connection to an HDD

I'm working on trying to control a hard drive with an Arduino Uno, but I'm having trouble with the power supply. From what I know, both the Molex Mate-n-Lok and the new SATA connectors both have 2 ...
5
votes
1answer
241 views

Can I damage an arduino by setting pins high with no load

I have an Arduino project that has 15 different output pins set. Some are currently attached to devices and others are not. Will testing my program cause a problem / damage if it sets pints to HIGH ...
5
votes
2answers
26k views

Max current of Vin and 5V pin on Arduino Nano

What is the max current of the Arduino Nano's Vin (30) and 5V (27) pins?
5
votes
2answers
6k views

Having difficulty uploading sketch to an Arduino Pro Mini

Having developed and tested a project using an Arduino Uno, I would now like to upload it to an Arduino Pro Mini (5V, 328, 16MHz) for semi-permanent, long-term use, but I can't get any sign of life ...
5
votes
2answers
13k views

How to choose a transmit pin in the IRremote library for an Arduino Uno?

I am looking for a way to choose a pin on the Arduino Uno. This pin will be used to send the signal of an IR LED. I am using the IRremote library. e.g. Below is the IR send demo which uses pulse ...
5
votes
1answer
48 views

Custom LED toggling function: one out of three LEDs misbehave

I connected three LEDs to an Arduino Uno and wrote a simple LED class. I toggle all the leds the main loop, but for some reason one led (connected to pin7) always misbehaves, skips one toggle or stays ...
4
votes
4answers
11k views

Is there any way I can turn off the 5V pin?

I'm trying to find a way I can toggle the 5V pin to turn on/off. I want the voltage to pass to another wire at a certain point. It should be off and then when something happens, the 5V should turn on. ...

1
2 3 4 5
10