A
A
Alexander Evseev2016-11-08 21:23:12
Arduino
Alexander Evseev, 2016-11-08 21:23:12

I can not understand what is the problem of this code on Arduino?

I am attaching the error code.
Arduino: 1.6.13 Hourly Build 2016/11/03 09:33 (Windows 7), Board: "Arduino/Genuino Uno"
C:\Users\Александр\Desktop\sketch_nov04a\sketch_nov04a.ino: In function' void loop()': sketch_nov04a
:67: error: 'listenToSecretKnock' was not declared in this scope :133: error: 'validateKnock' was not declared in this scope sketch_nov04a:135: error: 'triggerOutput' was not declared in this scope sketch_nov04a:154: error: 'validateKnock' was not declared in this scope exit status 1 'listenToSecretKnock'
This report will have more information with File -> Preferences -> "Show verbose output during compilation"
option enabled . Code taken from this site. cxem.net/arduino/arduino148.php

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Alexander, 2016-11-08
@NeiroNx

the compiler cannot find the functions because they are accessed before they appear in the code. Usually carry up according to subordination or use a header file.

E
evgeniy_lm, 2016-11-08
@evgeniy_lm

Strange, but this code compiled without errors for me

K
kalapanga, 2016-11-09
@kalapanga

Try the stable version of the Arduino IDE. Place the folder with sketches somewhere without Cyrillic on the way.
In 1.6.11 it compiles without errors.

A
Alexander Gusev, 2016-11-09
@Sanchogus

In 1,6,5 without errors, you can try to write function prototypes before setup():
void listenToSecretKnock(void);
void triggerOutput(void);
boolean validateKnock(void);
Should help.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question