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
3
votes
1answer
52 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....
0
votes
1answer
60 views

Arduino doesnt seem to be reading my pin states

I seem to have an unbelievable thing. My code was working perfectly on one arduino, when i upload the same sketch to another one, it is behaving strangely, it seems like it is not reading any of my ...
0
votes
1answer
57 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/...
0
votes
1answer
53 views

Using the LED pin for input

I have an Arduino-like device with few GPIO pins (DigiSpark clone). It is based on an 8-pin AtTiny85 IC so there are Power, Ground and six other pins, two of those six are being used for USB keyboard ...
0
votes
4answers
63 views

Is it dangerous to connect two output pins together?

If I have two output pins, one set high and the other set low with digital or analog write like this digitalWrite(PIN1, LOW); digtialWrite(PIN2, HIGH); and then I short them together using a wire, ...
0
votes
1answer
22 views

What does a tilde (~) mean as annotation for a data pin?

When I examine the datasheet for the Arduino Micro (couldn't find the Pro Micro on their site, btw) then I see some data pins annotated with a ~ character, and some are not. For instance, D9 has a ~ ...
0
votes
2answers
53 views

Put Arduino in DFU mode (no RST pin)

The instructions to put the Arduino into DFU say I should shortcut briefly the 2 leftmost ICSP headers next to the USB port. But my board does not have them. Does anybody know what are the right ...
0
votes
1answer
32 views

ESP 8266 reverse digitalWrite behaviour on which pins?

I am using a device with an ESP 8266 microcontroller. I have discovered that setting LED_BUILTIN to HIGH turns the built-in LED off and setting LED_BUILTIN to LOW turns the built-in LED on. This ...
0
votes
0answers
61 views

Arduino GPIO automatically turns high

I've been trying to turn on 21W bulb with Protected MOSFETS. But somehow the bulbs are getting high automatically from arduino. I've tried all the hardware related things like pull down with different ...
0
votes
0answers
32 views

Adafruit 2.8 TFT LCD Touchscreen 4 wire pins - unclear instructions

Warning - Noob question I am trying to follow the instructions provided by the vendor https://learn.adafruit.com/2-8-tft-touch-shield/touchscreen-paint-example to no avail. Specifically: We ...
0
votes
1answer
41 views

Arduino voltage connection pins

On the Arduino power connector jack, which is the positive terminal pin and the negative pin?
0
votes
1answer
28 views

Using PortB as a sink, not working

Out of ideas here, i try using PB0-3 as sinks for a LED matrix and the pins just won't sink. My test code: void setup() { //bitClear(SPCR, 6); pinMode(PD5, OUTPUT); pinMode(PB0, OUTPUT); ...
0
votes
1answer
76 views

Arduino Nano use SPI pins as I/O pins? and still be able to do ISP?

I wonder if can use the Arduino Nano SPI-pins(MOSI,MISO & SCK) as I/O pins in a sketch? and still be able to program over ISP? Of course I will physical disconnect the Arduino from any other ...
0
votes
1answer
41 views

How to use attachInterrupt() in ATtiny85 with Arduino IDE?

It's possible use external interrupts/attachInterrupt() with the ATtiny85 when I program with Arduino IDE? If is possible, how many inputs (for external interrupts) the ATtiny85 have and which are ...
0
votes
0answers
73 views

Help Needed! How do I attach a color sensor to a 2WD robot and use it to control its movement?

I'm relatively new to the world of Arduino, so don't be frustrated if I ask questions that could be silly. This project has a deadline, so any input is appreciated. THE PROJECT: I am planning to ...
0
votes
1answer
25 views

How to set a not plugged in pin to ground or Low

I have digital pin 7 when set to High it does and when set to low it does not. The only way I can get consistent High or Low is to use a 2 position 3 pin switch with my pin 7 in the middle and ground ...
0
votes
0answers
34 views

ESP8266 GPIO limitations with HC-SR04

I want to build a systems that measures if some parking spots are occupied or not. I chose to use an ESP8266 12-E NodeMCU Kit with multiple HC-SR04 ultrasonic sensors. In my project, it is essential ...
5
votes
3answers
9k 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?
0
votes
2answers
46 views

Read amount of I/Os in code

I want to write an Arduino code, that runs on several different Boards. The code can perform digitalRead/Write operations, but the pin number will be set from the user/outside. I want to include a ...
1
vote
1answer
99 views

What is the equivilent of PORTx for Teensy (4.0)?

I've seen people use code like PORTB |= 0x1 << 6 to set the sixth bit of PORTB in arduino. I understand that this is significantly faster than using digitalWrite. How can this be done using a ...
0
votes
0answers
28 views

How to specify pin in Servo library?

Here's what caused the original confusion. As one know, Arduino nano and UNO use analog pin as PWM pins, while Arduino Mega use digital pin output as the PWM pins, which this webpage ignored to ...
0
votes
1answer
77 views

How to connect HC-06 BT module without pins?

So, from one popular Chinese store I ordered a HC-06 module that I received... and due to some mistake from a store, I received a HC-06 without connecting pins. So usually HC-06 looks like this (with ...
0
votes
1answer
112 views

Multiple variant.cpp entries for same physical pin

Some variant.cpp files have more than one entry that points to the same physical pin. For example (from Arduino Zero's file): // 14..19 - Analog pins // -------------------- { PORTA, 2, PIO_ANALOG, ...
1
vote
1answer
19 views

Help, I want to turn relay constantly on until a difference is detected, but triggered only one instead

Help, I want to use arduino to control relay for electricity, i get data from a sensor and when a value is detected it should be constantly on until another detection triggered again, i can get the ...
-1
votes
2answers
124 views

USING HX711 ( WITH LOADCELL) WITH PCF8574 IN NODEMCU

I have used hx711 and loadcell with nodemcu (esp8266) in its D1 and D2 pins ( here I have used Logic level shifter and a 5v supply to power hx711).It worked perfectly fine. Due to the lack of enough ...
0
votes
0answers
44 views

Unable to get input from Wemos D1 PIR sensor

I am using the script below to create a motion sensor using a Wemos D1 and a PIR sensor. I'm using the ESP8266 Community board manager (V2.6.3). THE PROBLEM When I use the Wemos D1 R1 board no ...
0
votes
0answers
41 views

Non-Linear readings on Analog Pin A0 vs. other Pins A1

I discovered a curios behavior of my Nano v3. The analog Pin A0 seems to measure data in a non-linear way while the other pins seem to work normal. Please have a look at the screenshot. This is the ...
0
votes
1answer
149 views

Trying to read different gas levels with MQ2 Gas Sensor

I found a link on how to connect MQ-2 Gas Sensor to Arduino Uno. http://electronicsprojectshub.com/how-to-connect-mq2-gas-sensor-to-arduino/ After I bought all the parts and tried it out, the sensor ...
0
votes
1answer
124 views

Use JYETech 2.4 Inch LCD Display Screen Module with Arduino?

I have this JYETech 2.4 Inch LCD Display Screen Module that I would like to use for a project I have in mind, however, I'm not sure how to wire it up with my Arudino Mega. Here is the datasheet for ...
-2
votes
1answer
43 views

Can you use a 128 pin LCD on an atMega?

I found a couple old calculators and their LCD's have about 130 pins. I was wondering if I can build an LCD driver to reduce the number of I/O pins, because I don't want to use like 14 I/O extenders; ...
-1
votes
1answer
118 views

4:1: error: expected initializer before 'void' [closed]

int button void setup() { pinMode(13, OUTPUT); pinMode(12, OUTPUT); button 4; pinMode(4=INPUT); } void loop() { if(digitalRead(4)== LOW); { digitalWrite (13, HIGH); delay (250); ...
0
votes
1answer
41 views

Understanding analog pins in pinMode

When passing the pin number in pinMode its possible to use A0 - A7, does it apply only to that methode? How can pinMode expect a number (is it int?) type in case of digital pin another (is it then ...
1
vote
3answers
285 views

Issue connecting heartbeat & temperature sensor on arduino uno but working individually

So the code is working individually for temperature sensor and for heartbeat sensor but when i combine it together it shows wrong values for the temperature sensor I'm using lm35 temperature sensor ...
0
votes
1answer
623 views

Do some arduino pins give signals when the controller starts?

For example, on the ESP32 board there are several contacts that can issue pulses when the controller starts, which is connected with the operation of the chip itself. It is not recommended to connect ...
-3
votes
1answer
50 views

Can I power Raspberry Pi 3 via 3V3 and GND pin? [closed]

Can I power my Pi 3 using the 3v3 pin (pin 1) and GND pin (pin 6)? Also, if I want to protect the board from power surges can I just put a fuse between my power supply and the 3v3 pin? Thanks in ...
0
votes
1answer
88 views

Pin Mappings from Arduino Metro M4 Express Board to SAMD51

After looking through the internet, I coudln't find any document (not in the datasheet, no nice graphics on google image searches) that showed the mapping between the Arduino breakout board and the ...
0
votes
0answers
129 views

Made a light controller for the holidays

I am a new the world of Arduino. I found on YouTube, how to build a light controller (https://www.youtube.com/watch?v=WvG9c84ApFA&t=39s). I follow every step but it doesn't work. Here are some ...
-1
votes
1answer
52 views

Connecting 2-pin JST PH connector to Arduino Mega

I’m want to connect 50 LDR to my Mega, I wondering if I use a 2-female pin JST PH connector to connect the LDR, how can I link 2-pin male JST PH connector board to the Mega and does this board exist?
0
votes
0answers
93 views

HC-SRO4 always returns zero no matter what I do?

Wondering if it's the sensor or the code? can anyone help? I've used the code here /* HC-SR04 Ultrasonic Sensor with LCD dispaly HC-SR04 Ultrasonic Sensor VCC to Arduino 5V GND to Arduino GND ...
0
votes
2answers
144 views

Can a pin be Neutral, not high or low?

I'm trying to figure out a way to controll a DFplayer mini mp3 player with ADkeys. Because I only have two or three files to play at a fixed volume I find it easier to just use the ADkeys. https://...
-1
votes
1answer
815 views

How come some Arduino Nano pins (D3, D4, A3, A4, A6, A7) cannot be set high?

I made a sketch to switch on all digital and analog pins, and found out several pins did not work as expected. Note: I manually put a jumper wire from each digital and analog pin (one at a time) to a ...
0
votes
1answer
48 views

Running out of GPIO & looking for suggestions

I'm working on a project using a NodeMCU and am quickly running out of GPIO pins. I'm trying to decide which way to go to complete it. Right now, I have the MCU connected to a MAX31856 PT100 ...
0
votes
0answers
148 views

Using a 122x32 LCD display with u8g2

I recovered a 122x32 graphic LCD display, its reference is NMTB-S000087FYHSAY-04. Here are some pics It was retrieved from a completely rusted object, but the screen seems to work. It is a 122x32 ...
1
vote
1answer
26 views

Can I disable the TX pin by setting its mode to INPUT while still receiving data on the RX pin of a UART?

I'm using the ATmega328PB in a personal project with MiniCore. My board streams data in on the RX pin from another microcontroller, but my board also has a DIP switch connected to the TX pin, that's ...
0
votes
0answers
42 views

Creating WebServer with 5000 port with AT command(ESP-01f)

I'm setting webserver with toggle led. I want to create global webserver. I`m mean hat use server with global ip. For it I must use port too. global ip/local ip:port. I want to create on 5000 port. I'...
0
votes
1answer
37 views

Arduino Due Digital Inputs without Response

On two of my Arduino Due, when connecting the pin 3.3V to any digital inputs (37,36,35,34), no serial message nor LED_BUILTIN is thrown as output, only the Test message. Digital Pins are set as ...
1
vote
1answer
217 views

Output 3.3V when setting pin to high

I would like to pass 3.3V and Ground to an component. How can I achieve such a thing? I for example would like to let a wire get 3.3V when I for example do digitalWrite(pin, HIGH). It is hard for me ...
0
votes
2answers
74 views

How to set cables to connect Cp2102 to Pro Mini?

How to connect the cables in order to program the pro mini with the CP2102 usb interface ? The TX RX and GND is easy, but I am not sure about the RST, DTR, DST, etc I attached the images of both. ...
2
votes
2answers
196 views

measure +3V and -3V through resistor divider and switch on/off by digital pins

I've seen that resistor dividers can be used to read negative voltages, but I'ld like if there is a way to accomplish this with less components and having a way to turn this off. I was thinking if ...
2
votes
1answer
38 views

Which sources of randomness are available? [duplicate]

I need a souce of randomness to generate a seed to pass to randomSeed. Where can I get this randomness from? Well, I hear I can read random noise from an unconnected pin. But I need to connect 9 ...

1
2 3 4 5
9