Stack Exchange Network

Stack Exchange network consists of 174 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 [digital]

Digital refers to signals which are either on or off (high or low, one or zero). This contrasts with analog signals which have a range of values.

0
votes
2answers
36 views

Analog vs Digital Accelerometers - pro's and con's? [closed]

For my project i need to measure accelerations up to 16g. My options are either digital accelerometers such as the MPU6050 or MPU9250 or an analog accelerometer such as the ADXL326. What are any ...
0
votes
1answer
36 views

How can we use two devices at the same time with arduino?

I am using fingerprint module r307 and LCD together. In that, I am using 2,3 digital pins of arduino for data transfer to the fingerprint.(I tried other pin configurations for this but it didn't work) ...
0
votes
1answer
28 views

Elapsedtime variable not resetting

I am new to Arduino programming. Let me describe the application I am working on. I am pressing a button for a certain period of time (30 sec). I can not hold it in a pressed position for all the time....
0
votes
1answer
22 views

Routing Matrix with a large number of I/O [closed]

Lets say that i would like to make a 128x128 routing matrix with an arduino uno, Since i am unexperienced i think of using two 4051’s for 8x8 patching and because i want to persist the patch, ...
1
vote
1answer
65 views

Arduino UNO LED half brightness when connected to digital GND but not analog [closed]

I am using an Arduino UNO. When lighting an LED with the switch button on a joystick module, I have two situations: If the LED's cathode is connected to GND on the digital pin side of the Uno, the ...
0
votes
2answers
141 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
178 views

Read frequency of input in digital pins

This is a somewhat theoretical question: Let's say I have some sensor that sends digital signals to one of Arduino's digital ports. Now, I don't know the frequency it sends those signals in. For ...
1
vote
3answers
45 views

For Arduino, is there a meaningful difference between carriage returns?

Serial.write(0x0d); // hex Serial.write(13); // ASCII Serial.write('\r'); // char Is one more efficient? I read how it depends on the terminal program. So does that mean the IDE? (This is my ...
0
votes
2answers
104 views

Digital Sound sensor

I am having trouble with my digital sound sensor. My goal: Clap 2 times and a led goes on. So I wrote this code. I don't know if it is correct or not. This happens: If I clap, from the serial monitor ...
-1
votes
1answer
43 views

Error in finding frequency of an input signal

Here is my code to find the frequency of an input rectangular wave at pin 8 of the Arduino Uno board. const uint16_t freqPin = PB0; const uint16_t load = 0; unsigned long int count=0; unsigned int ...
0
votes
0answers
48 views

Arduino 24v I/O Shield

I'm searching an arduino uno shield that will allow to communicate with industrial grade PLC and sensors (24v). Something like https://github.com/TheDIYGuy999/Mega_PLC/tree/master/Digital_Input_Board ...
0
votes
1answer
34 views

Digital selection for gain control not working instead showing 0

I am making a device which will have a button to measure the input and another button to reset and the inputs are variable analog values(0 to 5v) and output is a ratio of two analog input voltages. It ...
0
votes
1answer
105 views

How to digital read and send the data through serial to PC with speed around 2 MHz?

I would like to read analog data with frequency sampling around 2 MHz and send it to PC to be processed with python for digital oscilloscope. I use Arduino Nano. I have found ADC (AD9057, PDF) that ...
2
votes
2answers
281 views

Digital Band pass filter arduino 1100-1300 Hz

For a project I need to design an digital band pass filter. I started of with this in Matlab: wch=1100*2*pi; wcl=1300*2*pi; sys=tf([1/wch 0],[1/(wch*wcl) 1/wch+1/wcl 1]) sysd=c2d(sys,9615,'tustin') ...
1
vote
2answers
49 views

Upcoming Project [duplicate]

Hey guys I have a project that will require 20 I/O pins with serial communication from a computer to control each of the pins. I would like something as small as possible would a arduino micro or uno ...
0
votes
1answer
146 views

4x4 matrix keypad - Multiple inputs cause extra readings

I have the following matrix keypad - I am using this as a sort of controller with my Arduino (Mega2560) but I can't get real multiple inputs to work. I am able to have say two individual keys ...
0
votes
2answers
60 views

Where can I find the complete list of Arduino Serial Command & Query Strings?

I am planning to use the Arduino as a replacement for a USB-Controlled Digital I/O device, which will be integrated into an existing C++ software package that I created. I understand that the Arduino ...
4
votes
3answers
884 views

Fool Proofing My Arduino IC Checker [closed]

I am creating an IC checker for some high school juniors since a faulty IC can be a nuisance of a bug to find when bread-boarding. These ICs are all simple TTL gating from the 74LS series; the set I ...
0
votes
1answer
47 views

Light Powered Motor Troubles [closed]

I'm working on a small car (<1 kg) which will drive when there is light and stop when there isn't. Below is a plan with code drawn up (the only numbers I know for sure are the current gains for the ...
2
votes
1answer
68 views

Consequences of dynamically changing input/output configurations of digital pin?

I am creating an IC checker for a large chunk of the 74ls series (basic TTL logic chips), which means that I have 14 pins running to the IC to verify its functionality. One pin is power (+5V) and ...
1
vote
3answers
231 views

digitalRead keeps giving 1

I am new to arduino programming and I have bought arduino UNO a few days ago. I am trying to read the value of pin 4 using digitalRead with pinMode INPUT_PULLUP but it keeps giving me 1 even when the ...
0
votes
1answer
126 views

Connecting two analog multiplexers (CD4051b)

Is it possible to connect two CD4051b analog multiplexers together so that I can receive 14 analog inputs through them? Just by using one analog pin and three digital pins on the Arduino UNO.
1
vote
1answer
48 views

Need to “Extend” a Arduino Digital Signal

Here's the scenario: We have 1 arduino uno accepting DMX and converting that to a signal that is being sent out digitally (PIN 3). The digital signal then goes to several IR LED senders that control 3,...
0
votes
2answers
30 views

Powering via an I/O Line

I have an SPI 128x64 OLED display. Is it safe to power this display's VCC from a digital I/O pin? I would like to do this so I can connect it flush to my arduino's header, and so I can control the ...
-2
votes
1answer
144 views

Why would digital outputs on Arduino Due be less than 3.3V?

We are working on a project that requires a temperature sensor to tell the Arduino Due to turn a digital pin to HIGH (3.3V) to active a relay so a heating pad can be powered on. We have diagnosed all ...
1
vote
0answers
359 views

Controlling an MCP41HV31 Digital Potentiometer

I need to control a 10kOhm digital potentiometer in rheostat mode in 256 steps. I found an Arduino tutorial, which works with an MCP41010 (I added a viper resistance according to the datasheet). This ...
4
votes
2answers
158 views

Arduino-based mains frequency monitor follow-up

Following my previous question, I'm getting closer to thinking about putting together this mains frequency monitor. I would just like to do a sanity check on my electronics before I order the ...
5
votes
5answers
392 views

Arduino-based mains frequency monitor

I'm looking to put together a simple mains frequency monitor based on the Arduino platform. The mains here are 250 V @ 50 Hz, but obviously these fluctuate slightly, which is the whole point of the ...
0
votes
0answers
35 views

How to check if the same device is connected to 2 digital pins?

I have 2 2-pin DC motors wired to my arduino uno. I would like to write a class that will correctly select the two pin numbers on the arduino that any single given motor is attached to. I thought ...
5
votes
1answer
232 views

Why digital pin not reading ON from push button switches connected to 5V and pull-down 10K resistor?

Here's my circuit: And the code: //pins const int control1 = 2; const int control2 = 3; const int enable = 9; const int pinDirection = 4; const int pinOnOff = 5; const int pot = A0; //states ...
0
votes
1answer
275 views

Too low voltage on digital input on attiny45

I'm using one of my attiny's pins as digital input. I use it with a pulldown resistor. As input I use simple square wave generated by a separate waveform generator. igh state for square wave is 5V, ...
0
votes
1answer
406 views

Arduino Control TV over RS232

I have a LG TV(LG 32SL800 ZB), which has a RS232-Port for Control and Service. And I am wondering if I could control this port with my Arduino (NODE-MCU) and a module like this one RS232 Board? How ...
8
votes
7answers
17k views

What's the difference between analogWrite and digitalWrite?

As the title states. What's the difference between the two? analogWrite(pin,0-255) vs digitalWrite(pin,LOW-HIGH)
-1
votes
1answer
415 views

3 buttons digital inputs [closed]

I have 3 digital button inputs, I want to do a continuous scan of 3 of them until a button is pressed and to know which button has been pressed. Please help, I'm new to programming and arduino. ...
0
votes
2answers
968 views

The fastest way to read out a digital pin state in an Arduino Due

What is the fastest way to read a digital pin status in an Arduino Due? Is it possible to achieve speed in the Nanosecond area? With which type of code I can achieve this? Edit: This question is not ...
0
votes
2answers
92 views

Trying to explain strange behavior when attempting to do a digitalWrite to A7 on a pro mini?

I found out the hard way today that pins A6 and A7 can't be used as digital outputs, but what actually happens when you try to read/write them? Some backstory: I soldered some headers onto a pro mini ...
0
votes
3answers
4k views

How do you configure ADC7 on the Arduino Pro Mini as a digital output?

I'm attempting to use the pin labeled 'ADC7' from the Atmega328p TQFP package. The Atmega documentation suggests that can be used either as an analog or digital I/O point. I'm trying to configure it ...
1
vote
2answers
214 views

manual square wave period is off

I'm generating a square wave with my Arduino UNO using the following: #define pin 10 // data pin to control servo // pulse width (in microseconds) int pulsewidth = 2500; // 400 Hz // wave period in ...
-1
votes
1answer
38 views

Measure voltage of data output?

I'm trying to control a few NeoPixels using a 3.3V Particle Photon. I've got a 5V power source that I'm using to power the NeoPixels (as they require that voltage. That works fine. Them I'm using a ...
0
votes
1answer
275 views

What is the datatype of the pinMode function?

I just tried it, but the Arduino IDE crashed, I hope its not related. I want to declare a datatype like this: int a = pinMode(pin, OUTPUT); or something like that, but I'm not sure what datatype the ...
0
votes
1answer
968 views

Sending digital signal from one arduino to another

I have one arduino with two proximity sensors that send two digitalWrite signals if an object is detected. I checked to make sure the output of these is working properly and only sending high signals ...
1
vote
1answer
79 views

Interfacing Digital clock with Uno

I want to take input from a clock for a specific time and respond to it. I am taking alarm as input because it will send some signal to a buzzer and I want to decode it through Arduino. I am using ...
0
votes
1answer
234 views

Perform function after a period of time

I am working on a project that I am supplying with voltage an LED through a digital pin (26) and I want the LED to be switched off after 4 seconds. I am using Arduino Mega2560 and I am programming it ...
4
votes
1answer
46 views

Cheapest way to change digital output source

Powering at 5 volts, atmega328 output ~4.7 volts. I need to output between 12 and 24 volts @ 2 amp. I'm currently using relay but they are costly. Is there a way to do it with transistors or any thing ...
1
vote
1answer
59 views

How can I get analog-in reading from Digital-PWM-out on the same board?

I have a wire going from PWM4 to A0 but I don't dare turn on my Arduino Mega in case this is incorrect. PWM4 will eventually go to an analog device but I want to make sure the read value is what I ...
0
votes
1answer
122 views

How to interpret analog values sent to Arduino from line scanner?

So I have a line scan camera attached to my Arduino Mega and I'm trying to send it a digital clock impulse and get an analog output back. The line scan camera is supposed to return 128 pixels. So far ...
0
votes
2answers
71 views

Digital Pin State - Some 1, Some 0

I'm running a sketch that looks for inputs to digital pins 3, 4, 5, 6, and 7. The gist of the sketch is that it's a digitalRead() from 3-7 with a Serial.println() to the monitor. The odd thing is ...
1
vote
3answers
1k views

Send information (such as a string) over digital pins

I wan't to send information from my arduino digital pins to another arduino's digital pins like a string, or a char. Can I do this without something like Software Serial? The reason I am asking is ...
3
votes
2answers
182 views

UNO's digital pin continue to read 1 for a while

I'm doing some tests and I notice a bad things with digitals pins. I have a wire that sends 1 signals. If i connect it to a reading pin, I read 1 - and it's ok. But if i disconnect it, for 5-6 seconds ...
0
votes
4answers
1k views

PWM on non PWM pins

Why does this code not function in a similar way to the example fade sketch? I have had to resort to using bit-banging as a way to implement PWM onto non PWM pins due to a lack of available free pins ...