expected primary-expression before '.' token

I get an error for this program:

myStepper ;.step(25);

The error:

expected primary-expression before '.' token

How do I fix this

I got an error for this code:

#include <Stepper.h>

int sensorReading = analogRead(A0);
int sensor = A3;
// initialize the stepper library on pins 8 through 11:
int D9 = 9;
int D10 = 10;
int state = LOW;
int val = 0;
int stepCount = 0; // aantal stappen die de motor al heeft genomen
const int stepsPerRevolution = 200;
//int myStepper = stepsPerRevolution;

Stepper myStepper(stepsPerRevolution,D9, D10);

void setup() {
// pinMode(Stepper, OUTPUT);
pinMode(sensor, INPUT);

void loop() {
val = digitalRead(sensor); // lees de sensor waarde
if (val == HIGH) {
if (state == LOW) {
Serial.println(“Motion detected!”);
state = HIGH; // variabele word hoog

myStepper ;.step(25); <--------- Error given to

The error I got is:

expected primary-expression before ‘.’ token

I’ve tried a lot but nothing worked. I don’t even know what primary expressions are.

A semi-colon ; ends a statement. So 'myStepper ;.step(25);' has an extra one it doesn't need.


When I remove this ; And the code becomeds this:


I get this new error: expected ';' before '.' token

I'm literally stuck in a loop.

What is the 'and' doing in there?


Honestly, no idea. It's for a school project, I work with one other guy. Let me remove it and see what it does.

Post the code you have now, in code tags, and the exact error message

No idea how to put it in code tags, but the problem seems to be fixed by removing the 'and' in my code.

No idea if the code will work, but it stopped giving errors