Skip to main content
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
  • 106k
25 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

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,780
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
  • 18.2k
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
  • 106k
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,198
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
  • 106k
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
  • 44.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
  • 106k
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
  • 106k
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.5k
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,486
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
  • 106k
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

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
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
  • 18.2k
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
  • 106k
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
  • 106k
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,486
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
  • 106k
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,248
6 votes

Checking a jumper between two pins on Arduino

First off, the premise: having the keyboard open all the time can make it tricky to program is completely false. The problems that people experience with programming are when the Arduino is ...
Majenko's user avatar
  • 106k
6 votes
Accepted

Can I use the PWM pins as regular digital input/output pins?

Yes you can use them as ordinary digital io pins. PWM is essentially a normal digital output pin that is repeatedly turned on and off at a high rate. The magic is that the turning off and on is done ...
GMc's user avatar
  • 393
6 votes
Accepted

Connecting an arbitrary number of pins to pin holes without soldering?

As you already have seen, there are not many options to contact such boards without soldering, because they are meant to be soldered. Those hammer headers are an option. When you find a seller for ...
chrisl's user avatar
  • 16.5k
6 votes

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

There are at least four ways of referring to pins on any Arduino board: Board-order: Simple numeric order (1,2,3 ...) of physical location of pins on printed circuit board anticlockwise from the USB ...
RedGrittyBrick's user avatar

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