Hi I am in need of a code that I can interface a 0 to 5 volt analog system and output a modified analog signal. Modified signal will be adjustable with a potentiometer to boost the output. At the lowest setting the input and output will be 1:1 ratio. At the highest pot setting the input will be 0 and the output will be 5. Also the encoder has an equal and opposite output so that will need coded the same way but backwards, so basically there will be two inputs and two outputs plus a potentiometer.Seems very doable if somebody could help me that would be great. Please PM me for more details and what you would charge to do thisThanks
If you bothered to read the Arduino specs, you would change you mind about what is very doable.Paul
Serial.print(F("Pot value: "));Serial.print(analogRead(inputPin) * 10 / 1023.0);Serial.println(F(" V."));
Not sure I understand what you mean? I would think this is a fairly simple operation. Instead of voltage dividing, it needs to be multiplied. I am just not experienced enough with writiing anything beyond simple code to attempt without a lot of spare time on my hands. Maybe I am missing somthing?
Yes, missing the fact the Arduino cannot output a variable voltage
Sorry I didn't clarify that the output voltage will never be over 5v. I know that voltages to and from arduino can not exceed 5v. I am not asking to increase them over that amount. We are dealing with an analog 0-5v system.
Are you familiar with PWM? That is what you get from Arduino's ADC, no 0-5V