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.

Filter by
Sorted by
Tagged with
0
votes
1answer
284 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 ...
2
votes
6answers
30k views

Digital pins on Arduino function as both positive and negative terminals?

I'm learning the arduino platform and working on a circuit that connects the two pins of a piezo buzzer -- one to ground and the other to a digital pin of the arduino board. In this configuration, is ...
0
votes
1answer
3k views

4 channel relay module reversed? Or is it my code?

So I am designing a simple project where my Arduino reads analog values from a potentiometer, or rotation sensor, as it is called on EBay, and uses that value to determine how many relays to close. I ...
0
votes
1answer
778 views

How to read a higher voltage digital input?

Lets suppose I have a circuit with a car battery, a switch and a led. The led will turn on when the switch is closed, and turn off if it's not. I want to remove the led from the circuit and put an ...
8
votes
8answers
59k 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)
6
votes
5answers
790 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 ...
2
votes
2answers
242 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 ...
1
vote
2answers
2k 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 ...
1
vote
1answer
1k views

Measuring LPO (Low-Pulse Occupancy)

I'm using an Arduino clone (Seeeduino Lotus) together with a Shinyei PPD42NS sensor to measure air quality. The sensor reports its measurement as Low-Pulse occupancy. What would be the best way how to ...
1
vote
2answers
726 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
vote
1answer
1k 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 ...
1
vote
1answer
8k views

Can I specify that analog pins be used for digital output?

http://arduino.cc/en/Reference/pinMode notes that The analog input pins can be used as digital pins, referred to as A0, A1, etc. Is it possible to configure these pins as digital output pins as ...
0
votes
2answers
122 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 ...