Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [digitalwrite]

The tag has no usage guidance.

0
votes
2answers
21 views

Using NodeMCU D8 (GPIO15), D4 (GPIO2) and D3 (GPIO0) pins

I am using a NodeMCU board and have already used 6 digital pins as output for interfacing with the LCD. I intend to use 2 more digital pins, one as input and other as output for interfacing an ...
0
votes
0answers
14 views

digitalWrite on Trace SWO pin

I'm using STM32(generic board) and I want to control bi-color LED(common anode). STM32 pin layout and scheme is below, so please see it. Now, in theory scheme Works, but in practice it Works halfway. ...
1
vote
3answers
83 views

How to initialize digital output pin as low

I need to define a pin as output for relay module but when i do it in setup section, relay is activated (low - 0) automatically then i deactivated immediately with coding digitalWrite(pin, 1) but this ...
0
votes
2answers
46 views

Replace digitalWrite with a selective bitwise operation

I have the following code with digitalWrite I aim to write with bitwise operation only. No portability concerns here whatsoever. (for atmega328p here) #define DATAOUT 11//MOSI byte commandbits = ...
1
vote
1answer
52 views

Does direct port access interfere with PWM?

I think I've scoured the SE for questions about PWM, and fast digitalWrite etc, but I didn't see this point addressed. I need to use direct writes to some digital pins. Some of the pins on the port ...
0
votes
2answers
287 views

Sending a digital signal from one Arduino to another to trigger an event

I am wanting to send a digital signal from one Arduino to another. The goal is for one Arduino send a HIGH signal to a pin on the receiving Arduino. While the pin is HIGH, do function I initially ...
0
votes
1answer
84 views

setting output analog/digital pin to ground

So I need to automaically eject a CD from a Blu-Ray drive, I have a wire welded on the drive's card that if manually connected for a split second (pulse) to the ground of that same card on the drive, ...
0
votes
1answer
50 views

A minor confusion in digitalWrite command

Will the Arduino IDE interpret digitalWrite(13,x), where x>0, as digitalWrite(13,HIGH)? And will it interpret digitalWrite(13,x), where x<=0, as digitalWrite(13,LOW)?
1
vote
1answer
415 views

Analog pins as output by using digitalWrite

I am making a triac-controlled light dimmer. To control the triac I want to use pins A4 or A5, because others are occupied. I have tried the following functions and methods, but nothing seems to put ...
1
vote
1answer
1k views

Arduino digitalWrite not working

I am trying to control this OWI Robotic Arm using the Arduino's digital outputs (I am using pins 12 & 13). If I wire up the wires to ground and 5V it goes one way, if I switch the wires, it goes ...
0
votes
2answers
365 views

DigitalWrite Cannot Power HC-06 Bluetooth

To save power consumption, I tried to connect the HC-06 bluetooth module to a digital pin of my Arduino Nano. (HC-06 +5V <=> pin 11, HC-06 gnd <=> gnd) In that way, I can toggle the bluetooth ...
4
votes
5answers
1k views

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

So what exactly I am trying to do is control a motor and be able to turn it both ways without any extra parts. So if the hmp was on (the plus pole) and the hmm (the minus pole) acted like ground the ...
0
votes
1answer
88 views

Broken Loop and dim LEDs

I want to make 2 LEDs blink back and forth continuously, but they only do so once, and the second one is very dim. code: int ledone = 12; int ledtwo = 10; int keepgoing = 1; void setup() { pinMode(...
2
votes
1answer
2k views

Is the DigitalWriteFast library still needed?

Yesterday I played with a SRAM 621024 SRAM 1 Mbit IC and since I use a lot of pins, digitalReads and digitalWrites are needed including shift registers (see Example Since it took a long time for ...
-1
votes
1answer
374 views

The function AnalogWrite is outputting less voltage than digitalWrite on my board

I can't figure out why the output voltage of analogWrite(255) is less than the voltage of digitalWrite(255). My code and an image of my setup are below. Some other useful information is that I am ...