user18832: int k ;
int q ;
int f;//pot

void setup() {
  pinMode(k, OUTPUT);
  pinMode(q, OUTPUT);
  pinMode(f, INPUT);
}
void loop() {
  zzf();
}

void gf()
{
  int a = f;//test the conditions of f and store in new variable int a
  if (a == 80)//if a reads 80 then increment a by 1
  {
    ei();//run the ei() function
  }
}

void ei() {
  int k = 3;
  int a = Serial.read();
  {
    digitalWrite(k, a);
  }
}

void zzf() {
  for (f = 0; f < 80; f++) {
    analogWrite(q, f);
  }
}


user4143: Lean the proper C syntax. This is completely wrong:
void gf()
int a = f;//test the conditions of f and store in new variable int a
{

And this is just as wrong for the same reasons:
void ei()
int k = 3
int a = Serial.read();
{digitalWrite(k, a);}


18832: <pre><code>int k ;
int q ;
int f;//pot

void setup() {
  pinMode(k, OUTPUT);
  pinMode(q, OUTPUT);
  pinMode(f, INPUT);
}
void loop() {
  zzf();
}

void gf()
{
  int a = f;//test the conditions of f and store in new variable int a
  if (a == 80)//if a reads 80 then increment a by 1
  {
    ei();//run the ei() function
  }
}

void ei() {
  int k = 3;
  int a = Serial.read();
  {
    digitalWrite(k, a);
  }
}

void zzf() {
  for (f = 0; f &lt; 80; f++) {
    analogWrite(q, f);
  }
}
</code></pre>
 4143: <p>Lean the proper C syntax. This is completely wrong:</p>

<pre><code>void gf()
int a = f;//test the conditions of f and store in new variable int a
{
</code></pre>

<p>And this is just as wrong for the same reasons:</p>

<pre><code>void ei()
int k = 3
int a = Serial.read();
{digitalWrite(k, a);}
</code></pre>
