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
66k 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 ...
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 ...
22
votes
3answers
121k 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 ...
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 ...
1
vote
1answer
2k views

What are the best GPIO pins to use for my project?

I'm working on a home automation project to control my Sommer Base+ garage door opener through Home Assistant. The project consists of a WeMos D1 Mini with two reed switches (to detect door open/...
3
votes
3answers
3k views

Uno pin 13 LED mysteriously always ON at 0.14V unless pinMode OUTPUT

I upload a blank sketch: pin 13 LED is on. Why? I connect pin 13 to GND: it turns off until I remove the connection I connect multimeter between pin 13 and GND: measures 0.14V and LED turns off until ...
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?
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,...
3
votes
1answer
1k views

ArduinoUno+LcdKeypad+ArduinoWifi=Pins Problems

Is it possible to connect these two shields to my Arduino Uno? After a research on the internet, I discovered that they use some of the same pins. Even so, is it still possible for me to connect the ...
2
votes
6answers
29k views

Digital pins on Arduino function as both positive and negative terminals?

I'm learning the arduino platform and working on a circuit that connects the two pins of a piezo buzzer -- one to ground and the other to a digital pin of the arduino board. In this configuration, is ...
3
votes
1answer
463 views

Cannot set MOSI pin low even after ending SPI

I'm building a battery operated device and must shutoff MOSI pin during sleep because it leaks current through the SD card if I don't (about 400 µA). Problem is, it won't stay off. I've looked at ...
2
votes
2answers
662 views

Why PJ0 and PJ1 are not reporting as PCINT pins

When the sketch shown at end-of-question is compiled and uploaded to an Arduino board, it is supposed to Serial-print a list of available digital pins, showing for each pin whether it supports PWM or ...
2
votes
3answers
8k views

Use RFID-RC522 with other Pins

I'm wondering where the pin setting is manifested in the library. I want to use the RC522 with other digital pins than the default 50-53 pins, because I am using a shield for a display on theese ports....
2
votes
1answer
206 views

Arduino Standalone - photo shows incorrect pin wired to MOSI

I have been building a standalone Arduino on a breadboard following the guide, Building an Arduino on a Breadboard. The guide is generally very good, however, I have yet to get the Arduino working, ...
2
votes
2answers
1k views

Why declare analog pins as ints?

I often see code like this: const int piezo = A0; const int sensorPin = A1; From my understanding, an int variable can hold things like -123, 0, 1, 456, etc. How can A0 or A1 be an int?
2
votes
0answers
1k views

Analog Input not going to Zero

Arduino Uno user here I am building a project with 4 analog inputs A0 dose not work. A1 A2 and A3 work perfectly fine! But for last input when I connect to A4 or A5, then they do not go to zero. They ...
1
vote
1answer
651 views

How to add Ultrasonic Sensor to the board?

I am making an RC car , have combined the Arduino UNO R3 with the AR 293d, and pluged in the HC-SR04 sensor to the SRO4 hole at the left top corner in the below graph. However, besides one sensor I ...
-1
votes
2answers
4k views

What is VREF pin?

Was searching for some help on connecting Flir camera w/ Lepton board to arduino and found this thread for power you can reroute the 3-5V to the VREF pin, then you have a nice clean solution. You ...
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): ...
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?
3
votes
3answers
2k views

WiFi module ESP8266 + Arduino Uno

I'm trying to connect a WiFi module, ESP8266-01 to an Arduino Uno. But, as I've understood, this module will only work with 3.3 V. Since all of the data pins use 5 V, one of the solutions is to use a ...
2
votes
4answers
7k views

Not enough pins on Uno?

I'm making touch-sensitive, light up tic-tac-toe board. That means 9 LEDs + 9 capacitive sensors. Each LED needs 1 pin and each sensor needs 2...meaning I'd need 27 pins to properly control each ...
3
votes
2answers
2k views

Low Power Pin Change Detection (ATtiny)

I want to use an ATtiny as data logger for the opening and closing of a door/window. For that I am using a reed-switch. Since I want to run it from a 3V coin battery, long term power consumption is ...
2
votes
2answers
4k views

Multiple buttons on single interrupt, how to debounce?

Buttons on separate interrupt pins work fine (triggered on FALLING), bouncing is handling by forcing a 80ms lockout period during which further presses are ignored. I like that solution for being ...
2
votes
2answers
9k views

Why is my interrupt code not working?

Background I'm trying to write code to read signals from a six-channel RC receiver on an Arduino Mega 2560. Currently I am keeping the code to just read one channel to make things easy to troubleshoot....
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, ...
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 ...
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 ...
3
votes
2answers
27k views

How to control 19 RGB LED strips with one arduino?

I need to light up 19 RGB LED strips, which it seems would require 19*3=57 PWM outs and 57 transistors. The transistors aren't an issue, but of course the 57 PWM's is. Even if I hacked the digital ...
3
votes
3answers
5k views

can arduino on output mode sink current?

I have a arduino set below: pinMode(1,OUTPUT); digitalWrite(1,LOW); Now, I am expecting 1.2mA current flow through the pin that is set as output. Is that accepted? If so, what it the max current a ...
2
votes
3answers
10k views

Basic Question - ESP8266 Board Pins

I have an embarrassingly simple question. My experience to date has been limited to Arduino Uno + Wifi101. I bought an ESP8266 and noticed that the GPIO pins don't match the printed numbers on the ...
2
votes
4answers
16k views

How to wire up 4-digit 7-segment display?

I have an Arduino Mega and the CL5642BH, a 4-digit 7-segment display. I found very helpful code here, but I don't understand how to wire it up on the breadboard. The display has 12 pins: 6 on the top ...
2
votes
3answers
3k views

Use same ground with 2 wires?

So I have 3 ground pins, but I need 4 motors on my Arduino. Can I connect multiple motors to the same ground pin?
0
votes
3answers
307 views

Controlling Arduino from Raspberry Pi

I am trying to control an Arduino Leonardo R3 to run some code when "triggered" from a Raspberry Pi. This would be in a loop so that it can be run multiple times. I have set up the Raspberry Pi and ...
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,...
4
votes
1answer
4k views

ESP 12 unusable pins

The ESP 12 board has 22 pins Are all of them usable? I understand that there is an external flash memory that is accessed through SPI, but I'm not sure what the impact on the pins is. And if it is ...
3
votes
1answer
777 views

Why do ESP boards break out the SPI flash pins?

I have an ESP32 development board and a NodeMCU board here. Both breaking out the pins for the SPI flash of the ESP. These pins are mentioned in standard pinout descriptions as must/should not connect....
3
votes
1answer
5k views

NodeMCU does not boot up when GPIO pin is high

I have a NodeMCU board connected to a door and there is a micro switch that makes one GPIO pin (GPIO15 - D8 in this specific case) go high when the door opens. My problem is if I lose power while the ...
3
votes
2answers
8k views

Reading many analog signals in arduino

I need to measure around 50 - 100 analog sensors (resistors). This poses two challenges: Arduino has fewer analog pins. I'm targeting something small like arduino Mini or Nano, which can have up to 8 ...
3
votes
3answers
10k views

Why does a Piezo Buzzer not require a PWM digital pin (Gallileo Gen2)?

According to my current (poor) understanding, only the PWM pins (with the ~) among the digital pins (ignoring Analog pins) can be passed to analogWrite(). I understand the servo therefore - since ...
3
votes
1answer
743 views

To connect a simple toy circuit and trigger with an arduino?

I have a small circuit from a toy sword that has an LED and a small speaker. It was powered by a couple of small coin cells. I am trying to figure out how to connect it to my Arduino so I can trigger ...
1
vote
3answers
4k views

Connect ethernet cable wires directly to pins

Is it possible to uncrimp a RJ45 plug and connect the wires directly to the Arduino pins? I guess I'd have to decrypt the ethernet signal then on my Arduino which might not have enough processing ...
1
vote
2answers
1k views

Where is PORTB defined?

On Arduino I can set digital pins by setting special variables PORTB and PORTD (or maybe they are not variables?). Where are those variables defined? I grepped /usr/share/arduino, but found nothing. ...
0
votes
1answer
2k views

Esp8266 V12 Wiring

I have tried a Google search and cannot find any place that tells me exactly how to wire the version 12 esp8266 , How should it be wired for normal operation and for flashing ? I am designing a diy ...
0
votes
1answer
4k views

When the Arduino is in reset mode are the digital pins high impedance?

I have an Arduino (Arduino A) hooked up to an external FRAM chip and I want to be able to pull the Arduino A's reset pin to ground to keep it in a constant reset state. Then I want to hook up another ...
0
votes
2answers
257 views

Can I use the same Data Registry for both input and output pins?

This is for a class in which we are not allowed to use the Arduino Library (Not my choice or preference). I know to use DDRB for the B pins. This is the code that I have so far: //Global pointers ...
0
votes
2answers
699 views

Using a L2938D Motor Driver Module. (Not IC, Module)

I have been trying to use my newly bought L293d Motor Driver Module to run motors(a single motor in this test case, simple 5V toy motor) from my Arduino UNO. Thing is, this is an entire module, not ...
0
votes
3answers
604 views

Why all unset pins of my Arduino Uno are outputting 2 volts?

I am new to Arduino and physical computing When I measure the wire coming from any UNSET Arduino uno pin, the result is approximately 2 volts even the "ANALOG IN" pins. Considering that the pins which ...
0
votes
2answers
268 views

Accessing digital pins from the Atmega 16u2 on the Uno

I'm running a custom firmware on the ATmega16U2 (Switch-Fightstick). Is it possible to access the digital pins of the UNO from the ATmega16U2?