The analogWrite() function is used to generate a PWM (Pulse Width Modulation) output signal on compatible pins.
1
vote
2answers
37 views
Can i supply the AREF pin with an Analog pin from the same board?
I guess its a dumb question but couldnt find anything about it online. I know its possible to supply the AREF pin with 3.3 V to increase the ADC resolution.
For the project i am working on the ...
1
vote
2answers
90 views
A question about resistance measurement with arduino
Lately I was asking myself about the posibility of measuring a potentioneter resistance with arduino, and my questions are:
1) Is it possible?
2) if it's possible, what kind of restriction the ...
0
votes
1answer
31 views
PWM output voltage too high
I'm experimenting with PWM with the code below, but (according to my analog multimeter) the voltage on the output pins reach up to 5V whilst the largest analogRead(IN1) value is only around 700:
...
0
votes
0answers
146 views
Parsing GET function + ESP8266 + ARDUINO IDE
I am working on a ESP and making it a simple Http web server. I have successfully ON/OFF the led using the browser. I need to use PWM, instead of Switching the led. As of now When I hit http://192.168....
0
votes
0answers
44 views
How to use the timer to generate a pulse wave of the specified frequency and duty cycle
So we have the tone library, which produces a 50% duty cycle square wave of varying frequency, and analogWrite() which produces a fixed frequency wave of varying duty cycle. Is there any way to ...
3
votes
2answers
106 views
How to use the analog comparator to determine when an analog pin has reached a certain voltage?
I am trying to find some information on how to use the analog comparator on an Atmega328 to detect when an analog pin has reached a certain voltage (3.16 volts).
I cannot find any example code that ...
-2
votes
2answers
52 views
Wi-Fi from Arduino to computer serial COM
I am somewhat new to the Arduino world and so far having fun. I am making a gardening watering system for my first project. I am at the final stages of completion and want to add a Wi-Fi module on the ...
0
votes
0answers
95 views
Making AC current with pin 11
Trying to make AC current(50Hz) with arduino uno seems to be not working (or wrong code).
int up;
int down;
int out=11;
void setup() {
pinMode(out,OUTPUT);
Serial.begin(9600);
}
void loop() {
...
0
votes
1answer
65 views
RGB Led - mixing colors using analogWrite
Currently I'm controlling an RGB LED with my Arduino Nano.
I'm mixing the colors using analogWrite
Though, the LED's don't light up at all for low analogwrite values and the difference between the ...
4
votes
1answer
162 views
Why does an LED sometimes flash when increasing brightness?
This is admittedly a cross-post from LED fade malfunction (random flash) but I can't get an answer on the Arduino forum.
I was mucking around with some very basic code and I noticed that when ...
1
vote
2answers
340 views
Is it possible to make a mathematical function generator using Arduino?
I want to build a function generator but not the ones which outputs square wave or sawtooth ect. I will input a discrete function lets say f(n) = e^n for n=0 to n=100 and the output array will be ...
2
votes
3answers
134 views
Read Voltage at PWM off time, and Current at PWM on time
For a battery charging project, i am using an ARDUINO UNO which is driving a buck converter to provide the battery with the charging current. I am using external ADCs to measure the battery's charging ...
1
vote
3answers
1k views
Sending a value from one arduino to another
I wonder if it is possible to send a value from one arduino to another.
Basically, I have one arduino measuring let's say weight, but I want to display that value using an lcd in another arduino.
...
0
votes
1answer
272 views
AnalogWrite custom voltage
I want to get a low voltage on output pin of Arduino mega. I have connected Pin 46 to A3, and wrote 120 value to 46 port. Expected was to get 2-3v on A3 input pin. Instead I always get 1023 values as ...
0
votes
1answer
187 views
Which board/shield to generate (non-PWM) analog outputs?
I am currently building a project involving a laser scanner (two galvanometers with mirrors that deflect a laser beam) that I want to control. The galvos need +-10V differential signals (and I'd like ...
7
votes
4answers
5k views
Is there a way to play sounds from an Arduino without using a sound shield?
I would like to play a wav file (spoken words) from my Arduino. I do not want to add a sound shield. Is there a way to play a sound through an output pin? The quality does not have to be great.
0
votes
2answers
652 views
It is possible to control brightness of an LED strip (connected using a relay and having a seperate power supply ) using output from an arduino?
The circuit contains a relay interfacing with 12v power supply and LED strip. Can the brightness for this strip of LEDs be controlled using the analogWrite command?
This works perfectly for a single ...
0
votes
1answer
427 views
Could an `analogWrite` command and its variable output values be used to power multiple leds with same intensity? [duplicate]
I seem to be getting the right response on single LED but with multiple LEDS or a relay connected LED strip the voltage outputs seem to be insuffiecient.
What kind of analogWrite values does an LED ...
0
votes
2answers
63 views
When and where do I have to worry about accounting for sensor “noise”?
I just watched this excellent video tutorial that shows a simple Arduino program that toggles an LED via a pushbutton. Very cool!
Being brand new to electronics/robotics, I was shocked that something ...
0
votes
1answer
1k views
Arduino Due analog output has 500mV offset
I use a simple serial connection to tell the Due what to output into an analog output pin. However, the outputs are offset about 550mV (as seen on an oscilloscope) and the maximum value of 255 gives ~...
0
votes
2answers
2k views
How to make the motor car move left-forward / left-backward/ right-forward/ right-backward
I recently using the arudino uno to make the motor car. And I successfully make it move forward / backward / left / right
void forward(void)
{
analogWrite(EA,254); //speed 0 - 255
...
0
votes
1answer
225 views
Stabilizing output values of conductive sheet(Velostat) connected to analog pin A0 of Arduino
I am trying to do some experiments with conductive sheet (velostat). When I apply a force on the sheet it should change the value of resistance(output). I taking the output of the sheet by connecting ...
3
votes
6answers
5k views
Two Arduinos Send data via Analog Pin?
What I want to do is allow Arduino A to send some constant value to Arduino B.
I sense something inherently wrong with my approach, but I cant figure out what it is.
So in the diagram below you will ...
0
votes
2answers
940 views
analogWrite never outputs a non-zero voltage
With a very simple connection of an LED (which can withstand 5V) to ground and to a pin on my Galileo gen2, I can never output a non-zero voltage from the pin via analogWrite, regardless of whether ...
1
vote
3answers
2k views
Why does a Piezo Buzzer not require a PWM digital pin (Gallileo Gen2)?
According to my current (poor) understanding, only the PWM pins (with the ~) among the digital pins (ignoring Analog pins) can be passed to analogWrite(). I understand the servo therefore - since ...
1
vote
4answers
4k views
Issue with PWM output pin
I'm just starting off with using the Arduino and was learning about PWM
(http://arduino.cc/en/Tutorial/PWM).
Below is what my circuit looks like.
Below is the very simple code.
const int pinNine = ...
1
vote
1answer
173 views
Arduino PWM Frequency - Pros and Cons of Modifying
I am interested in using an Arduino Uno to produce an analog signal by running PWM through an RC low-pass filter.
I'll be controlling a highly dynamic object and need a clean voltage signal to ...
1
vote
1answer
154 views
analogWrite causes value from IR receiver to change
I'm playing around with an IR receiver and an RGB led.
I had it up and running, until I changed around some code. The remote seeming stopped working, but after looking at the values in the Serial ...
2
votes
2answers
121 views
Direct 5V current based on analog signal
I would like to manage many LEDs from my Arduino - 12 or so - but I do not have the available digital pins to do this. Only one LED needs to be on at one time. Instead, I was hoping to control these ...
0
votes
2answers
278 views
Non-blocking strobing code?
I'm trying to figure out how to create some non-blocking code to strobe some RGB leds with analogwrite 7 times a second; I'm really not to sure how to go about this. If anybody could give me some ...
1
vote
4answers
5k views
Can I turn off a device using the 5V and analog pins?
Could I connect a device that requires minimum 5V 1A from the 5V Pin to the Ground and somehow turn it off inside a sketch?
edit: I'm using a Due based boad, the digix http://digistump.com/wiki/...
-2
votes
1answer
539 views
Analog average sample wind speed sensor
I have wind speed sensor that can measure max speed upto 30 m/s with analog out put 0-5v. I have simple code calling from the loop. When I put the wind speed average code, the web server is not ...
3
votes
2answers
409 views
How to implement multiple LED modes in a sketch with potentiometers?
My hardware is 4 potentiometers connected to Arduino Analog 0-3, the output is an RGB led driver connected to Digital outputs 9,10,11. The output channels provide access to PWM control of those pins. ...
13
votes
2answers
13k views
Why do some pins have a different PWM frequency?
According to the Arduino reference for analogWrite(), the PWM frequency on most pins is ~490 Hz. However, it's ~980 Hz for pins 5 and 6 on the Uno, and for pins 3 and 11 on the Leonardo.
Why are ...