Answer the question
In order to leave comments, you need to log in
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
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.
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.
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 questionAsk a Question
731 491 924 answers to any question