help with millis

Greetings, friends, I am trying to make a code which turns on a led with different times and cycles added to that, the use of the potentiometer to increase the speed of ignition … if you can help me with any idea, I thank you … example This is how it works as I want but I cannot add anything else or increase the ignition speed

int led = 7;
int ledpin = 8;
int var = 0;
int i = 0;
int pot;
int ledState = false;
long unsigned time = 0;
unsigned long time_1 = 0;

null configuration () {
pinMode (7, OUTPUT);
pinMode (8, OUTPUT);
pinMode (A0, INPUT);
Serial.begin (9600);
}

void loop () {
pot = analogRead (A0);
var = map (pot, 0.510.0.3987);
digitalWrite (7, HIGH);
delay (2);
digitalWrite (7, LOW);
delay (2);
digitalWrite (7, HIGH);
delay (10);
digitalWrite (7, LOW);
delay (2);
for (i = 0; i <5; i ++) {
Serial.println (i);
digitalWrite (7, HIGH);
delay (15);
digitalWrite (7, LOW);
delay (2);

}
}

Here is the OPs code posted in the recommended manner, ie Auto formatted in the IDE and posted in code tags

int led = 7;
int ledpin = 8;
int var = 0;
int i = 0;
int pot;
int ledState = false;
long unsigned time = 0;
unsigned long time_1 = 0;

null configuration ()
{
  pinMode (7, OUTPUT);
  pinMode (8, OUTPUT);
  pinMode (A0, INPUT);
  Serial.begin (9600);
}

void loop ()
{
  pot = analogRead (A0);
  var = map (pot, 0.510.0.3987);
  digitalWrite (7, HIGH);
  delay (2);
  digitalWrite (7, LOW);
  delay (2);
  digitalWrite (7, HIGH);
  delay (10);
  digitalWrite (7, LOW);
  delay (2);
  for (i = 0; i < 5; i ++)
  {
    Serial.println (i);
    digitalWrite (7, HIGH);
    delay (15);
    digitalWrite (7, LOW);
    delay (2);
  }
}

OP please take note and follow suit when posting code

OP - I also note that the code does not compile

null configuration()? what is that?

The demo Several Things at a Time illustrates the use of millis() to manage timing without blocking. It may help with understanding the technique.

Have a look at Using millis() for timing. A beginners guide if you need more explanation.

...R

Your code doesn't compile so it definitely doesn't work. And it contains no attempt to do anything with millis(). There's not really anything there to help with.

Steve

aarg:
null configuration()? what is that?

In the OP's post in the Spanish forum it's 'void setup()' so I guess some auto translator has messed with it.

Steve

(deleted)

spycatcher2k:
Is this even real code?

It's what you get if for some reason you put var = map (pot, 0,510,0,3987); through a Spanish/English translator.

Fun isn't it?

Steve

ok friends maybe I did not understand but that code is compiled and works. what I am looking for is a help to be able to do the same with millis and to be able to add the potentiometer … thanks

I am not very good in English so I use a google translator…

It will probably be better if you continue with teh question that you have posted in the Spanish section of the forum