Skip to main content
Share Your Experience: Take the 2024 Developer Survey
28 votes
Accepted

NodeMCU - Vin pin as 5V output?

There is confusion about what is and what isn't possible with this board. This is because there are different versions with different power arrangements. NodeMCU 0.9 In this board the USB's 5V and the ...
Majenko's user avatar
  • 105k
24 votes
Accepted

What is an ICSP pin?

ICSP stands for In Circuit Serial Programming, which represents one of the several methods available for programming Arduino boards. Ordinarily, an Arduino bootloader program is used to program an ...
James Waldby - jwpat7's user avatar
17 votes
Accepted

NodeMCU - use flash button as input in loop()

The Flash button on NodeMCU is connected between io 0 and ground. You can use it as a button. Set pinMode(0, INPUT_PULLUP) and you will read io 0 LOW if the button is pressed. NodeMCU schema To ...
Juraj's user avatar
  • 18k
17 votes
Accepted

What to do with Arduino floating pins?

The simplest thing to do is set them to INPUT_PULLUP. If you want a purely hardware solution then you could connect them to GND through some resistors (10kΩ or whatever you have in that kind of order ...
Majenko's user avatar
  • 105k
16 votes
Accepted

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

To make explicit the implicit parasitic capacitance on the pin.
dannyf's user avatar
  • 2,770
11 votes

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

There are three things you can do: Remove the bootloader entirely and program the board with a hardware programmer (USB-ASP, Another Arduino, etc). Edit the bootloader source, recompile, and ...
Majenko's user avatar
  • 105k
11 votes

What type of connector does the GROVE system use?

Here is the updated link on the seed website. http://wiki.seeedstudio.com/wiki/File:3470130P1.pdf Also note that Digikey now stocks seeedstudio stuff. http://www.digikey.com/product-detail/en/seeed-...
TomKeddie's user avatar
  • 237
11 votes
Accepted

Male header pins on Arduino Uno

These are the In System Programming (ISP) pins. They are used to program the microcontroller without using the bootloader. The bootloader is a program already loaded into the flash of the ...
sa_leinad's user avatar
  • 3,188
11 votes

How to use analogWrite() on multiple pins at the same time?

You have your parameters the wrong way round: analogWrite(2, 100); analogWrite(6, 200); However: pin 2 on the Uno cannot do PWM, so you will have to pick a different pin. Look for the pins marked ...
Majenko's user avatar
  • 105k
10 votes
Accepted

How to get number of available pins in code?

It is quite easy actually: Serial.print("number of digital pins: "); Serial.println(NUM_DIGITAL_PINS); Serial.print("number of analog inputs: "); Serial.println(NUM_ANALOG_INPUTS); Note that these ...
Edgar Bonet's user avatar
  • 43.3k
10 votes
Accepted

NodeMCU does not boot up when GPIO pin is high

Certain pins of the ESP8266 perform special functions at bootup. GPIO15, when HIGH, makes the ESP8266 boot from an SD card. You can read more about the special functions of the pins here. The ...
Majenko's user avatar
  • 105k
10 votes

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

No, it's not going to work - even worse, you risk frying your Arduino -, for the following reasons: The Arduino data pins can't source (neither sink) enough current for that to work. The inductive ...
Enric Blanco's user avatar
  • 2,114
9 votes
Accepted

Max current of Vin and 5V pin on Arduino Nano

It's hard to say. The maximum the on-board regulator can provide is 800mA. However the actual amount it can provide at any time depends on other external factors - most notably: The voltage of your ...
Majenko's user avatar
  • 105k
9 votes

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

Every chip datasheet (and also the Arduino boards) uses 2 different ways to refer to the pins: Counting the physical pins in the order as they appear on the chosen package of the chip Referring to ...
chrisl's user avatar
  • 16.3k
8 votes

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

Recently I also faced similar problem, with connection as: 1=GND, 2=+5v, 4=11, 6=12, 11=5, 12=4, 12=3, 14=2, 15=backlight positive, 16=backlight negative Solution: I just connected VEE (pin 3) of ...
Suraj's user avatar
  • 81
8 votes

What type of connector does the GROVE system use?

I believe the OEM part is NS-Tech 1125S-4P: Wire to Board connector > PITCH 2.00mm > 1125 Series Good luck finding a vendor!
Aaron Cooper's user avatar
8 votes

How many pins does this circuit (HMC5883L) use?

Below image is the answer to your question. According to this image, magnetometer required four pins of arduino. GND of magnetometer ----> Arduino GND Vcc of magnetometer ----> Arduino 3.3 Volt ...
Hasan's user avatar
  • 1,476
8 votes
Accepted

Checking a jumper between two pins on Arduino

First of all, welcome here. Usually questions should contain, well, only one question ;) In any case the usual circuit with buttons (a jumper can be seen as a button) are these ones: simulate this ...
frarugi87's user avatar
  • 2,721
7 votes

Can Digital/Analogue pins double as power supplies?

Only for very light loads (a few mA). But why would you want to? The number of power pins doesn't dictate the number of devices you can power. Power pins can have as many things connected to one pin ...
Majenko's user avatar
  • 105k
7 votes

NodeMCU - Vin pin as 5V output?

my 2 cents: A LoLin NodeMCU V3 when powered via USB in the Vin pin reads 2.2 V (don't know why) but... in the VV pin you can get the 5V coming from the USB; so if you need 5V use that pin. The board ...
Carlos M's user avatar
7 votes
Accepted

INPUT_PULLUP not work for D8 in my NodeMCU v3

Pin D8 is esp8266 pin 15. This pin is one of the boot configuration pins and for use on a dev board, it must be pulled down at boot. So the NodeMcu has a pull down circuit on this pin and internal ...
Juraj's user avatar
  • 18k
7 votes
Accepted

Weird behavior (Couldn't pull the pin LOW)

You are creating a pointer variable, not a normal variable. That pointer variable is, until told otherwise, pointing at address 0x00. It covers 4 bytes. Addresses 0x00 to 0x1F are the internal CPU ...
Majenko's user avatar
  • 105k
7 votes
Accepted

Why do we use bitwise operators to assign PORTx, DDRx and Pinx?

My question is why do we need to use bitwise operations to make assignements? Because you're not assigning, you're modifying. If you want to turn on just pin 3 (for example) you need to only control ...
Majenko's user avatar
  • 105k
6 votes
Accepted

ESP8266: Is it safe to use pin 0?

You can absolutely use GPIO0 as an output. The ESP will read the state of GPIO0 once at boot (And never again thereafter) to determine what boot mode to enter. During this time it is an input, so, ...
Dawn Minion's user avatar
6 votes

How many pins are needed for a sensor?

Below image is the answer to your question. According to this image, magnetometer required four pins of arduino. GND of magnetometer ----> Arduino GND Vcc of magnetometer ----> Arduino 3.3 Volt ...
Hasan's user avatar
  • 1,476
6 votes
Accepted

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

The method I use is to provide the pins as parameters to the constructor. Those pin numbers are stored in variables to use later in the .begin() function and elsewhere. Most of the time I use ...
Majenko's user avatar
  • 105k
6 votes

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

I would use either of the following two possibilities: Use (class) variables and set them within the constructor. Advantages: Always initialized Easy to use (constructor and pin setup at once) Use ...
Michel Keijzers's user avatar
6 votes
Accepted

can arduino on output mode sink current?

Ok, I just found it. from the arduno docs: Atmega pins set aa output can source (provide positive current) or sink (provide negative current) up to 40 mA (milliamps) of current to other devices/...
Ryan B.'s user avatar
  • 103
6 votes
Accepted

Arduino Uno R3 to Wemos D1 R2 project migration - Pinout problems

The tricky thing with the WeMos boards is the pin notation is different from other Arduino boards. Sometimes you will see the digital pins on Arduino boards referenced with the Dn notation. For ...
per1234's user avatar
  • 4,178
6 votes

NodeMCU - use flash button as input in loop()

I recommend you EasyButton library, you can use pin 0 (D3) in NodeMCU, if you want use a external button module, you can wire your button between D3 pin and GND. https://github.com/evert-arias/...
Carlos Jesus Arancibia Taborga's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible