'Sequence' was not declared in this scope error

I just don't understand why i get this error. Can someone help me?

When i try to compile the code under i get error message "'Sequence' was not declared in this scope"

I have done that before without problem.

Here is my code:

#define BLYNK_PRINT Serial
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>

int buttonState;
int siren = 2;
int pirSensor = 4;
int orangeLED = 27;
int otherLED = 26;
int pirValue;

//---WIFI CRIDENTIALS FOR CONNECTING TO BLYNK SERVER-----

char auth[] = "*****";

char ssid[] = "*****";
char pass[] = "*****";

//---DECLARATION OF BLYNK TIMER -------------------------

BlynkTimer timer;


void setup() {
  Serial.begin(9600);
  Blynk.begin(auth, ssid, pass);
  pinMode(siren, OUTPUT);
  pinMode(pirSensor, INPUT);
  pinMode(orangeLED, OUTPUT);
  pinMode(otherLED, OUTPUT);
  timer.setInterval(100L, alarm);
  Sequence();
}
  
void Sequence {
  digitalWrite(otherLED, HIGH);
  digitalWrite(orangeLED, LOW);
  delay(5000);
  digitalWrite(orangeLED, HIGH);
  digitalWrite(otherLED, LOW);
  delay(5000);
}

BLYNK_CONNECTED() {
  Blynk.syncAll();
}


void alarm() {
  pirValue = digitalRead(pirSensor);
  Serial.print(pirValue);

  if (pirValue == 1) {
    digitalWrite(siren, HIGH);
    Blynk.virtualWrite(V1, "ALARM AKTIVERT!");
  }
  else {
        digitalWrite(siren, LOW);
    Blynk.virtualWrite(V1, " ");
  }
}

void loop() {
  Blynk.run();
  timer.run();
}

You are missing parens after the void Sequence.

void Sequence {

is not the same as

void Sequence() {

Oh my gad!! I saw that now.

I'm so f**** stupid sometimes.

Thanks :slight_smile:

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.