time manipulation

I want to decrease Analog input on andruino in a loop but it is not hapenning.
It does happen when i declare variable in software.
I am trying to decrease analog input by one like (--) inside a loop but it is not happening.

I am n00b in a field of computer sience.

Can anyone explain.

Thanks.

I want to decrease Analog input on andruino in a loop but it is not hapenning.

The Arduino reads whatever is being input to the analog pin. It can NOT change the input.

is there a workaround?

It's a fundamental contradiction. Like trying to talk with your ears, or see with your mouth. Input comes "in" and output goes "out".

Also, what does it have to do with your subject, time manipulation?

aarg:
Also, what does it have to do with your subject, time manipulation?

Maybe he meant he was manipulating how you use your time?

im trying to build volt down voltramp with analog inputs that declare start, time delay and in software is declared 0 .

If your native language is not English, try using Google translate. We can't understand you.

my native is not english.
All that stuff im talkin about is ok in analog.

pork:
my native is not english.

I can tell. That's why I'm asking you for a better translation. We have no idea what you're talking about.

Well, someday you will want to understand the roots.

well, lets cut the crap, why cant i make ramp down voltage with the start point from analog input?

why cant i make ramp down voltage with the start point from analog input?

Why can't you post some code, so we can get an idea what you are trying to do?

pork:
Well, someday you will want to understand the roots.

I'm a certified English as a Second Language instructor. I understand the roots.

you know what. I will sleep ower it, if code is not going to work tommorw i will post.

Perhaps the PWM?

lloyddean:
Perhaps the PWM?

Perhaps anything.

Doesn't speak english, give him chance

lloyddean:
Doesn't speak english, give him chance

Read the whole thread.

time manipulation
Maybe a flux capacitor would work in this case.

:wink: sorry

pork:
I want to decrease Analog input on andruino in a loop but it is not hapenning.
It does happen when i declare variable in software.
I am trying to decrease analog input by one like (–) inside a loop but it is not happening.

pork:
im trying to build volt down voltramp with analog inputs that declare start, time delay and in software is declared 0 .

There are two ways how I can interpret your question.

1) The first one is read the analog inputs in a loop; the below code reads all 6 inputs in sequence and prints the reading.

void setup()
{
  Serial.begin(9600);
  for (int pin = A0; pin <= A5; pin++)
  {
    Serial.print("Pin "); Serial.print(pin); Serial.print(": "); Serial.println(analogRead(pin));
  }
}

This works because A0 is defined as being the pin 14 (and A5 as being pin 19); this is on a UNO, other boards might have different numbering but the principle stays the same.

2) The second interpretation is that you read an analog input and next want to modify the value that was read. The below code demonstrates this. It will toggle the onboard LED (on an UNO) a number of times. The analog value sets the number of times as well as the delay between the toggles.

void loop()
{
  // read analog input
  int analogvalue = analogRead(A0);
  // do something with it
  while (analogvalue != 0)
  {
    // toggle onboard LED
    digitalWrite(13, digitalRead(13) ^ 1);
    // use analog value as delay
    delay(analogvalue);
    // decrement analog value
    analogvalue--;
  }
}

Note that if your reading is e.g. 400, it will loop 400 times with delays from 400 to 0 (so total delay is approx. 400 * 200 ms = 80 seconds before the analog input is read again).