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 ...
23
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 ...
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 ...
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 ...
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.
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-...
11
votes
Accepted
What type of connector does the GROVE system use?
It looks like the Grove connector is proprietary. I emailed Seeedstudio, and they directed me to this datasheet. Unless I'm reading it incorrectly, it doesn't appear to correspond to any type of JST ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
8
votes
Accepted
Uno pin 13 LED mysteriously always ON at 0.14V unless pinMode OUTPUT
The LED is driven by an op-amp (see the schematic). When the pin is configured as input the op-amp has an undefined input (floating input). Thus it may or may not turn on the LED. If you configure it ...
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
...
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 ...
7
votes
How to read pinMode for digital pin?
Seems like the Arduino core is missing a function to read the pinMode(). Here is a possible implementation:
int pinMode(uint8_t pin)
{
if (pin >= NUM_DIGITAL_PINS) return (-1);
uint8_t bit = ...
7
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!
7
votes
Double ## in macros
## is the concatenation operator in macros. It joins two macros or pieces of text together when expanded.
#define _SET_INPUT(IO) do {DIO ## IO ## _DDR &= ~MASK(DIO ## IO ## _PIN); } while (0)
...
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 ...
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 ...
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 ...
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 ...
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 ...
6
votes
How do I create a 9 bit number based on values from 9 digital inputs?
In your code you would use a 16 bit unsigned integer as your variable. As there is no such thing as a 9 bit type.
If the pins correspond to different ports on your micro, you basically do this:
...
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, ...
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
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
pins × 478arduino-uno × 147
programming × 35
esp8266 × 34
arduino-mega × 34
sensors × 32
power × 28
led × 27
serial × 21
arduino-nano × 18
i2c × 18
port-mapping × 18
hardware × 15
wires × 15
digital × 15
motor × 14
interrupt × 14
pwm × 14
spi × 14
shields × 14
input × 14
arduino-ide × 13
nodemcu × 13
lcd × 11
relay × 11