Arduino expected unqualified id before token

Arduino expected unqualified id before token

I am getting this error:

In function ‘void loop()’: headers_stepper_test:12: error: expected unqualified-id before ‘.’ token expected unqualified-id before ‘.’ token

The cpp library file:

the .h header file:

When I am trying to implement my own library files. I am not sure if I need the "void" in this case but the same error comes up either way. What is causing this?

Want to improve this question? Add details and clarify the problem by editing this post.

Closed 11 months ago .

1 Answer 1

You declare an object of type DHT and name dht . Then you try to call a method of DHT.read11() .

Instead, you should be using the object name, dht.read11() , or as @Gerben points out, change the way you declare the object: DHT dht; .

Not the answer you’re looking for? Browse other questions tagged arduino-uno or ask your own question.

Related

Hot Network Questions

site design / logo © 2020 Stack Exchange Inc; user contributions licensed under cc by-sa 4.0 with attribution required. rev 2020.1.10.35756

что делать если ошибка expected unqualified-id before ‘if’

void setup() <
pinMode(6, INPUT);
>

int K = digitalRead(6);

// (Если я правильно понял то здесь задаётся количество шагов на оборот, у меня 200)
#define STEPS 100

Читайте также:  Как очистить куки в мозиле фаерфокс
Ссылка на основную публикацию
Adblock detector