Ответы пользователя по тегу C++
  • Вопрос по Arduino (ошибок скетча)?

    donadonadona
    @donadonadona Автор вопроса
    IT Магистрант
    При вводе программный код в Arduino IDE
    и после проверки Compile
    Программа показала ошибки
    которые я не знаю, как чистить.
    Вот:
    Arduino: 1.6.11 (Windows 10), Board: "Arduino/Genuino Uno"

    Build options changed, rebuilding all
    ServerGuard_Dona_with_SIM800l:53: error: 'dht' does not name a type

    dht DHT; // DHT object

    ^

    C:\Users\admin\Desktop\ServerGuard_Dona_with_SIM800l\ServerGuard_Dona_with_SIM800l.ino: In function 'void loop()':

    ServerGuard_Dona_with_SIM800l:74: error: 'buttonPin' was not declared in this scope

    TestButtonState = digitalRead(buttonPin); // if LOW - do diagnostic (Power failure simulation)

    ^

    ServerGuard_Dona_with_SIM800l:81: error: expected primary-expression before '.' token

    int chk = DHT.read11(DHT11Pin);

    ^

    ServerGuard_Dona_with_SIM800l:82: error: 'DHTLIB_OK' was not declared in this scope

    if (chk == DHTLIB_OK) {

    ^

    ServerGuard_Dona_with_SIM800l:83: error: expected primary-expression before '.' token

    TempSensorValue = DHT.temperature;

    ^

    Multiple libraries were found for "Ethernet.h"
    Used: C:\Users\admin\Documents\Arduino\libraries\Ethernet
    Not used: C:\Program Files (x86)\Arduino\libraries\Ethernet
    exit status 1
    'dht' does not name a type

    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.
    Ответ написан
    Комментировать