Code won't compile because expected primary-expression before '==' token

This is the code from an online tutorial linked here And I have got all the libraries installed but when i try and verify it, I get this error

Arduino: 1.8.15 (Windows Store 1.8.49.0) (Windows 10), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None"

C:\Users\byron\Documents\Arduino\Camera\Camera.ino: In function 'void loop()':

Camera:213:19: error: expected primary-expression before '==' token

if (stepperStep- == 0) {

               ^

Multiple libraries were found for "WiFi.h"

Used: C:\Users\byron\Documents\ArduinoData\packages\esp32\hardware\esp32\1.0.6\libraries\WiFi

Not used: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.49.0_x86__mdqgnx93n4wtt\libraries\WiFi

exit status 1

expected primary-expression before '==' token

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

and I don't know how to fix it, please help me fix the error

Is stepperStep -???? correkt?

I don't really understand what you're saying?

Or did it say "stepperStep--"?
Or even just "stepperStep"?

umm well, i just copied the code from the website which says if (stepperStep– == 0) {

It's wrong.
It should be "--" by the look of it

ok, ill try it, thx for the help, I'll say if it works or not

Please leave a note on the tutorial comments section to point out their error.

ok, btw I think it worked, but I can't seem to get arduino ide to let me choose a port but I think I know how to fix that

so, umm, I just realised that I have an esp8266 not an esp32 but I am only using the board and not the esp32 board with a screen and I had used this code before on the same board but now when I try and upload it it won't let me because it says that I need to use an esp32 but like is said I had used it in the past with no errors, can u help me upload it without it stopping me.?????????

What errors are you seeing?

the errors are Arduino: 1.8.15 (Windows Store 1.8.49.0) (Windows 10), Board: "Generic ESP8266 Module, 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, dtr (aka nodemcu), 26 MHz, 40MHz, DOUT (compatible), 1MB (FS:64KB OTA:~470KB), 2, nonos-sdk 2.2.1+100 (190703), v2 Lower Memory, Disabled, None, Only Sketch, 115200"

In file included from C:\Users\byron\Documents\Arduino\Camera\Camera.ino:23:

C:\Users\byron\Documents\Arduino\libraries\Blynk\src/BlynkSimpleEsp32.h:15:2: error: #error This code is intended to run on the ESP32 platform! Please check your Tools->Board setting.

15 | #error This code is intended to run on the ESP32 platform! Please check your Tools->Board setting.

  |  ^~~~~

exit status 1

Error compiling for board Generic ESP8266 Module.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

@byronbonkers, because your initial problem was a programming problem, your topic has been move there. Installation and Troubleshooting is not for problems with your project; see About the Installation & Troubleshooting category.

NOTE: Copying source code from a web page often causes problems because the web page is usually aiming for beauty rather than accuracy. Always look for a 'raw' or 'download' option for the source code.

I think in your case the web page decided that two dashes together ("--") was a way of saying "long dash" so it made the substitution. That breaks the source code.

At the bottom of the box displaying the source code is a link named "view raw". Click on that to get the raw source code. Then copy and paste the source code to the Arduino IDE.

Note: Even though it does not show up on the "view raw" page, Select All, Cut, and Paste causes this line to show up at the bottom of the sketch:
{"mode":"full","isActive":false}
I don't know where it comes from but you will have to delete it from the sketch to get it to compile.

/*
  Tutorial: Control Stepper Motor With Blynk App Using ESP32
  
  Board:
  - TTGO T-Display ESP32
  
  Output:
  - 12V 28BYJ-48 Stepper Motor
    https://my.cytron.io/c-motor-and-motor-driver/c-dc-motor/c-stepper-motor/p-12v-28byj-48-stepper-motor-plus-uln2003-driver-board

  Library Manager:
  - TFT_eSPI by Bodmer Version 1.4.20
  - Blynk by Volodymyr Shymanskyy Version 0.6.1
*/

/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial

#include <WiFi.h>
#include <WiFiClient.h>
const char ssid[] = "Your WiFi SSID"; // WiFi name
const char password[] = "Your WiFi Password"; // WiFi password

#include <BlynkSimpleEsp32.h>
char auth[] = "Your Blynk Auth Token"; // Blynk Authentication Token
WiFiServer server(80);

#include <SPI.h>
#include <TFT_eSPI.h>
TFT_eSPI tft = TFT_eSPI(); // Resolution 135 x 240
#define FF17 &FreeSans9pt7b
#define FF21 &FreeSansBold9pt7b
#define ROW1 0,16
#define ROW2 0,38
#define ROW3 0,60
#define ROW4 0,82
#define ROW5 0,104
#define ROW6 0,126

#define BUTTON1 35
#define BUTTON2 0

#define STEPPER_IN1 27
#define STEPPER_IN2 26
#define STEPPER_IN3 25
#define STEPPER_IN4 33

#define REVOLUTION_STEP 2048 // 1 revolution

boolean stepperDirection = false;
int stepperStep = 0;
int stepperStepCount = 0;
boolean stepperMove = false;
long prevMillisStepper = 0;
int intervalStepper = 4; // Minimum is 2

boolean button1Pressed = false;
boolean button2Pressed = false;

BLYNK_WRITE(V0) // Button Widget is writing to pin V0
{
  stepperDirection = param.asInt();

  tft.fillRect(120, 65, 120, 25, TFT_BLACK);
  tft.setCursor(120, 82);
  if (stepperDirection) {
    tft.print("CCW");
  }
  else {
    tft.print("CW");
  }
}

BLYNK_WRITE(V1) // Button Widget is writing to pin V1
{
  int stepperSpeed = param.asInt();

  tft.fillRect(120, 87, 120, 25, TFT_BLACK);
  tft.setCursor(120, 104);
  if (stepperSpeed == 1) {
    intervalStepper = 4;
    tft.print("Low");
  }
  else if (stepperSpeed == 2) {
    intervalStepper = 3;
    tft.print("Medium");
  }
  else if (stepperSpeed == 3) {
    intervalStepper = 2;
    tft.print("High");
  }
}

BLYNK_WRITE(V2) // Button Widget is writing to pin V2
{
  stepperMove = true;
  stepperStepCount = 0;
  stepperStep = 1;

  tft.fillRect(120, 109, 120, 25, TFT_BLACK);
  tft.setCursor(120, 126);
  tft.print("Run");
}

void setup()
{
  pinMode(BUTTON1, INPUT_PULLUP);
  pinMode(BUTTON2, INPUT_PULLUP);
  
  pinMode(STEPPER_IN1, OUTPUT);
  pinMode(STEPPER_IN2, OUTPUT);
  pinMode(STEPPER_IN3, OUTPUT);
  pinMode(STEPPER_IN4, OUTPUT);

  Serial.begin(115200);
  Serial.print("Initialize Blynk.");

  tft.init();
  tft.setRotation(3);
  tft.fillScreen(TFT_BLACK);
  
  tft.setFreeFont(FF21);
  tft.setTextColor(TFT_BLUE);
  tft.setCursor(ROW1);
  tft.print("Blynk Status:");
  
  tft.setFreeFont(FF17);
  tft.setTextColor(TFT_WHITE);
  tft.setCursor(120, 16);
  tft.print("Initialize...");

  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }

  Serial.println("");
  Serial.println("WiFi connected.");
  Serial.println("IP address: ");
  Serial.println(WiFi.localIP());

  Blynk.begin(auth, ssid, password);

  tft.fillRect(120, 0, 120, 35, TFT_BLACK);
  tft.setCursor(120, 16);
  tft.print("Ready!");

  tft.setFreeFont(FF21);
  tft.setTextColor(TFT_RED);
  tft.setCursor(ROW3);
  tft.print("STEPPER");
  tft.setTextColor(TFT_GREEN);
  tft.setCursor(ROW4);
  tft.print("Direction:");
  tft.setCursor(ROW5);
  tft.print("Speed:");
  tft.setCursor(ROW6);
  tft.print("Status:");

  tft.setFreeFont(FF17);
  tft.setTextColor(TFT_YELLOW);
  tft.setCursor(120, 82);
  tft.print("CW");
  tft.setCursor(120, 104);
  tft.print("Low");
  tft.setCursor(120, 126);
  tft.print("Stop");

  Blynk.virtualWrite(0, 0);
  Blynk.virtualWrite(1, 1);
  Blynk.virtualWrite(2, 0);
}

void loop()
{
  Blynk.run();
  
  if (digitalRead(BUTTON1) == LOW &&
      button1Pressed == false) {
    button1Pressed = true;
    
    stepperDirection = false;
    stepperMove = true;
    stepperStepCount = 0;
    stepperStep = 1;
  }
  else if (digitalRead(BUTTON1) == HIGH &&
           button1Pressed == true) {
    button1Pressed = false;
  }
  
  if (digitalRead(BUTTON2) == LOW) {
    
    stepperDirection = true;
    stepperMove = true;
    stepperStepCount = 0;
    stepperStep = 1;
  }
  else if (digitalRead(BUTTON2) == HIGH &&
           button2Pressed == true) {
    button2Pressed = false;
  }
  
  if (millis() - prevMillisStepper > intervalStepper) {
    
    if (stepperMove == true) {
      if (stepperDirection) {
        if (stepperStep++ >= 3) {
          stepperStep = 0;
        }
      }
      else {
        if (stepperStep-- == 0) {
          stepperStep = 3;
        }
      }

      if (stepperStepCount++ == REVOLUTION_STEP) {
        stepperMove = false;
        stepperStep = 4;

        Blynk.virtualWrite(2, 0);
        
        tft.fillRect(120, 109, 120, 25, TFT_BLACK);
        tft.setCursor(120, 126);
        tft.print("Stop");
      }

      switch (stepperStep) {
        case 0:
          digitalWrite(STEPPER_IN1, HIGH);
          digitalWrite(STEPPER_IN2, LOW);
          digitalWrite(STEPPER_IN3, LOW);
          digitalWrite(STEPPER_IN4, LOW);
          break;

        case 1:
          digitalWrite(STEPPER_IN1, LOW);
          digitalWrite(STEPPER_IN2, HIGH);
          digitalWrite(STEPPER_IN3, LOW);
          digitalWrite(STEPPER_IN4, LOW);
          break;

        case 2:
          digitalWrite(STEPPER_IN1, LOW);
          digitalWrite(STEPPER_IN2, LOW);
          digitalWrite(STEPPER_IN3, HIGH);
          digitalWrite(STEPPER_IN4, LOW);
          break;

        case 3:
          digitalWrite(STEPPER_IN1, LOW);
          digitalWrite(STEPPER_IN2, LOW);
          digitalWrite(STEPPER_IN3, LOW);
          digitalWrite(STEPPER_IN4, HIGH);
          break;

        default:
          digitalWrite(STEPPER_IN1, LOW);
          digitalWrite(STEPPER_IN2, LOW);
          digitalWrite(STEPPER_IN3, LOW);
          digitalWrite(STEPPER_IN4, LOW);
          break;
      }
    }

    prevMillisStepper = millis();
  }
}

thx, but umm, I just realised that I have an esp8266 not an esp32 but I am only using the board and not the esp32 board with a screen and I had used this code before on the same board but now when I try and upload it it won't let me because it says that I need to use an esp32 but like is said I had used it in the past with no errors, can u help me upload it without it stopping me.????????? Here are the errors Arduino: 1.8.15 (Windows Store 1.8.49.0) (Windows 10), Board: "Generic ESP8266 Module, 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, dtr (aka nodemcu), 26 MHz, 40MHz, DOUT (compatible), 1MB (FS:64KB OTA:~470KB), 2, nonos-sdk 2.2.1+100 (190703), v2 Lower Memory, Disabled, None, Only Sketch, 115200"

In file included from C:\Users\byron\Documents\Arduino\Camera\Camera.ino:23:

C:\Users\byron\Documents\Arduino\libraries\Blynk\src/BlynkSimpleEsp32.h:15:2: error: #error This code is intended to run on the ESP32 platform! Please check your Tools->Board setting.

15 | #error This code is intended to run on the ESP32 platform! Please check your Tools->Board setting.

  |  ^~~~~

exit status 1

Error compiling for board Generic ESP8266 Module.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Do you think this

#include <BlynkSimpleEsp32.h>

could be a clue?

ok, thx so do I change it or what

It seems unlikely that you used this exact ESP32 sketch on your ESP8266. And this sketch uses a display that you never had. It really sounds like this ESP32 sketch is not the one you ran previously on your ESP32.

But I am sure of it

Just realised that when I did it last time I was using a nodemcu 32s
so I'm using that now lol