Hey there.
It's been a while since I learned to code the arduino and I can't remember how to write the code for something I'm working on, nor do I have the hours to brush up on it at the moment.
I was hoping someone could help me out.
Basically I want 3 of the ADCs to read the voltages across two resistors in series, one for the bottom, one for the middle, one for the top, and adjust one of the PWM outputs (feeding into a filter) until both voltage readings at the ADC are equal to the number I set.
So basically something like
"read port 1"
"read port 2"
"read port 3"
"if the difference between port 1/2 and 2/3 is not 1v set pwm duty cycle to sweep from 0 to 100 until port 1 & 2 = 1v"
Something to that affect.
Anyone willing to throw me a freebie?
It's been a while since I learned to code the arduino and I can't remember how to write the code for something I'm working on, nor do I have the hours to brush up on it at the moment.
I was hoping someone could help me out.
Basically I want 3 of the ADCs to read the voltages across two resistors in series, one for the bottom, one for the middle, one for the top, and adjust one of the PWM outputs (feeding into a filter) until both voltage readings at the ADC are equal to the number I set.
So basically something like
"read port 1"
"read port 2"
"read port 3"
"if the difference between port 1/2 and 2/3 is not 1v set pwm duty cycle to sweep from 0 to 100 until port 1 & 2 = 1v"
Something to that affect.
Anyone willing to throw me a freebie?