I want to generate a sawtooth waveform ouput from my arduino uno. The sawtooth waveform characteristics are:
Ramp : 100 mV/sec
Frequency :10 Hz
Can anyone help me with the code?
I am really new at arduino and do not have a clue how to go about it..please help.. =(
A saw tooth waveform implies that you have an digital to analogue converter. The arduino does not have one of these built in so you will have to add it on.
What do you want to do with this wave?
I want to run a pneumatic pressure regulator with that signal and synchronize the start point of each sawtooth wave to switch on a solenoid valve.
I could run the pneumatic pressure regulator with a waveform generator that I have but then, is it possible for arduino uno to detect that waveform from the function generator and give a high output at one of its digital pins as soon as the ramp of sawtooth waveform starts.
is it possible for arduino uno to detect that waveform from the function generator and give a high output at one of its digital pins as soon as the ramp of sawtooth waveform starts.
Yes that is possible.
For such a low signal you could use a pin with PWM capability and add a filter to get your waveform.
Can you guide me how to write the code for it? :~ :~
I can guide you yes.
Just look at examples for LED
Use analog write to output the loop index of a for loop counting up.
Put a delay in the loop equal to one two hundred and fifty sixths of the time of your required waveform.